Hello, I am working with two tables - Users and Posts - that have a one-to-many relationship. My goal is to retrieve all the data in just one query using Eloquent, resulting in: Users Table: id | name Posts Table: id | user_id | title| body The retriev ...
Currently using Laravel 5.6 Implemented the following event to append div.categoryAjaxId: The code works as expected and successfully appends my content. //--------- get product ------------------------- jQuery('.orderProduct').click(function( ...
While working with a text editor, we have the ability to incorporate various HTML tags such as images and videos. However, I am only interested in displaying text fields. When I use {{$loop->content}}, it displays: <p><strong>EXAMPLE</st ...
Utilizing the package to incorporate an ajax datatable in my Laravel application. Within my controller class, I have implemented the following method for returning data for the datatables: function ajaxList() { // Fetch users with related groups and ...
Currently, I am in the process of authenticating our users through the API token. This is the snippet from my config/auth.php file: 'guards' => [ 'web' => [ 'driver' => 'session', ...
Currently, I am delving into laravel(5.2) and vuejs as a newcomer to both frameworks. My goal is to utilize vuejs to eliminate redundant time slots. In my blade file, the code looks like this: <div class="form-group"> <label for="form-fi ...
Here is the URL for my project: http://localhost/starmaker/admin The site works perfectly, but if I add an extra slash to the URL it redirects to localhost. For example: http://localhost/starmaker/admin/ (I added an extra slash after admin) an ...
While going through the Laravel documentation for version 5.2, I came across the implementation of facade in Laravel. <?php namespace AppHttpControllers; use Cache; use AppHttpControllersController; class UserController extends Controller { ...
I am currently working on developing an API for a registration form and running into an issue with the error format. While the validator correctly displays errors in an object format, I require the JSON response in an array format. $validator = Validato ...
Currently, I am diving into the world of AngularJS 1.5.8 + Laravel 5.3.17 + PHP 7 hosted on IIS/Windows 10 by following this helpful tutorial. However, when attempting to send a HTTP request using AngularJS $resource.delete() to Laravel, I keep encounteri ...
Journey Route::resource('/videofile', 'VideoController'); VideoController public function update(Request $req, $id){ $video = Video::findOrFail($id); if($req->hasFile('UserVideo')){ $vid = $req->file(& ...
In my Laravel application, I have an online appointment form that includes a "Select Doctor" field and a "datepicker." For example, if doctor "A" is available at the clinic on Saturday, Monday, and Wednesday, while doctor "B" is available on Sunday, Tuesd ...
Currently, I am using Laravel 5.2 along with jQuery AJAX to work on an application where I need to pass a large amount of data through AJAX requests. However, when dealing with larger datasets, I encountered the following error: SQLSTATE[23000]: Integrity ...
I have created a partial view to show the page header, which takes in two variables - an Icon and a title. The code for pageHeader.blade.php is as follows: <div class="page-header"> <div class="row"> <!-- Page header, center on small sc ...
I've been creating a custom package specifically for Laravel 5.2 and I have reached the stage where I am integrating Authentication. I attempted to include an Auth folder in my resources/views directory, along with the necessary Controllers in my package ...
I am having trouble utilizing an npm package in my Laravel 5 application. I am not very familiar with node and require, so I would appreciate some help understanding how to properly use npm packages. The npm package I am attempting to use is: https://www ...
I am currently utilizing a package https://github.com/barbushin/php-imap in my project to retrieve emails from a mail server. Below is the snippet of code I have implemented: $folder = Storage::disk('local')->getAdapter()->getPathPrefix(); try { ...
In my database, I have two tables named Users and ratings. The Users can give ratings to consultants, and the Ratings table structure is as follows: User_id | consultant_id | rating --------------------------------- 1 1 2 ...
I've been struggling to figure out why I can extract some parts of the JSON data but not others... Essentially, I am retrieving JSON from a URL (). In my PHP code (using Laravel5), I have the following: $url = 'https://public-crest.eveonline.co ...
What is this all about? Exploring different methods to filter the cache data. Here's a snippet of code showcasing two approaches. Approach : 1 $Categories = \Cache::rememberForever('Categories', function() { return \App&bsol ...
As I work with Eloquent ORM collections and query builders, I am currently exploring how to perform joins and apply "where" conditions within a collection similar to the query builder. Let's consider the tables: Users: ID | Name | Last name -------- ...
Experiencing slow loading times for local resources in my Laravel project has been a major issue. The files are unusually small and the cdn is much faster in comparison. Is there a way to resolve this problem? https://i.stack.imgur.com/y5gWF.jpg ...
After implementing this code in my Laravel 5.1 project's controller: $start_date = "2015-06-10"; $date = new DateTime($start_date); I encountered a persistent issue when running the code on both Chrome and Firefox. My website would become unresponsive at ...
Implementing passport using Laravel 5.4 has been a smooth process following the official documentation step by step. All was going well until I reached the "Frontend Quickstart" section. After executing the command to publish the vendor: php artisan vend ...
Here's an example of how to set parameters: For instance: http://localhost/firecek_web/pengaduan?barcode=8571385 Define the route: Route::get('/pengaduan','PengaduanController@index'); ...
I've run into a strange issue while using Laravel 5.1 - I can't seem to get parameters with the PUT method. Tool: I've been using POSTMAN (a chrome extension). Here's My Route Route::put('testing_put',function(Request $r){ print_r($r); }); The ...
Help Needed with Organizing My Laravel App I am looking to structure my Laravel application in the following way: API Admin panel Public website So far, I have started building a folder structure that looks like this: app/ Http/Controllers/ ...
I am experiencing an issue with my Laravel 5.2 and PHP7 setup on my hosting server. Everything seems to be working fine, except for the links that are supposed to generate and download xlsx files using Laravel Excel. Whenever I click on these links, I enco ...
Currently, I am in the process of developing an application with Laravel 5.2. My objective is to build an Edit modal using jQuery. Unfortunately, each time I attempt to update a record in the database, I encounter a 500 internal server error. Upon investig ...
I'm encountering an issue with Laravel that is resulting in a 405 MethodNotAllowedHttpException error. I've been attempting to implement validation for update requests in my resource PointController, but it seems that the validation rules defined in the @u ...
Is it feasible to append a variable to the Laravel cookie in the client using jQuery? Understandably, the Cookie is linked to the request during GET? Can you include a variable in the $request container in Laravel 5.2 using jQuery before initiating a GET ...
After removing the "public" from the URL path following this guide Laravel 5 – Remove Public from URL, I have encountered an issue with Vue scripts not working properly. Interestingly, if you add "public" back to the path, the script works fine (http:// ...
I've come across an interesting challenge that I haven't seen addressed before - how can I implement VueJs authorization actions in Vue templates? When working with Laravel's blade, handling this task is quite straightforward using the @can ...
I recently started learning Laravel 5.7 and encountered an error that says: The Mix manifest does not exist. (View: /var/www/html/laravel/resources/views/frontend/layouts/app.blade.php) Any help would be greatly appreciated. ...
Within my code, I have utilized {!! URL::route('editCatForm',['id'=>$row->id]) !!} to navigate to the named route editCatForm with a query string of ?id=5 or any other value dynamically retrieved from $row->id @foreach($catego ...
I encountered a problem with my Laravel application. Can someone assist me in troubleshooting this particular exception? FatalErrorException in SerializableClosure.php(153) : eval()'d code line 2: I am unable to call the getOwnerEmail() function on an ...
javaScript code: Retrieving data from a dropdown and displaying it in the inner HTML of a div. function showcost() { var days = document.getElementById("Ddays"); var Dudays = days.options[days.selectedIndex].text; var div = docu ...
I have been facing issues while trying to upload photos in Laravel using jQuery AJAX. I keep encountering an error message: The photo must meet the following criteria: - The photo must be an image. - The photo must be a file of type: jpeg, png, jpg, gif, ...
After a user logs in, I need to retrieve their user ID immediately. I have attempted to do this using a request but encountered an error message that says: "Too few arguments to function AppHttpControllersAuthLoginController::redirectTo(), 0 passed ...
I encountered a quirky issue while working with Laravel 5.2. I have a chunk of text that I'm attempting to display using some explode functions. The strange part is, Laravel is rendering it oddly by adding incorrect ':' before the end of the ...
After a user successfully registers on my registration form, I would like to send them an email. To ensure that the page's response time is not affected, I want to run the email process in the background. In order to achieve this, I came across two m ...
I have developed a unique Laravel CMS application that is functioning perfectly on my local environment. Now, I am attempting to deploy it on a shared hosting server. To achieve this, I have organized all Laravel app files and folders (excluding public) i ...
Working on my project using Laravel 5 and feeling a bit puzzled at the moment. I'm trying to check if a user is logged in using my middleware. If not, I want to generate a unique link for that particular user like so: $code = str_random(32); return r ...
Having an issue with Laravel 5.2.39 where after logging in successfully, the webpage doesn't redirect to member/add-ticket. Can someone point out what might be wrong? Below is the code snippet: Kernel.php protected $middlewareGroups = [ 'web' =& ...
Is it possible to perform bulk insertion in MySQL using the firstOrCreate function in Laravel when data is being sent through a RESTful API? This is how my Model looks: { "hashtags": [{ "text": "hashtag1" }, { "text": ...
After submitting my page, I am trying to display any validation errors underneath the appropriate form field if there are any. Currently, I am encountering an error in my console. If you could take a look at the code and suggest any changes to improve it, ...
Within my database, I have three entities: products, categories, and product_category. A single product can be associated with multiple categories, and some of these categories may have a parent category. The desired information on how these entities are r ...
Exploring JavaScript and how to accomplish the following tasks Snapshot The issue I am facing is that if I click on a product, and then click on settings, both are open. However, I want only the currently clicked toggle to be open. For instance, if I cl ...
I need to restrict the datepicker input control to only allow selection of dates from the current date onwards. Despite trying to implement validation using the bootstrap-datepicker library and the following JavaScript code, I am still facing issues: $(' ...
I am currently working on a Vue app that has an image uploader feature allowing users to upload multiple files. I want to implement validation to ensure that only images of a specific size are uploaded. If the uploaded files do not meet the requirements, I ...
I am currently retrieving data from MySQL using Laravel query builder, converting it to JSON format as per the suggestion of W3schools. However, when trying to display the fetched data using AngularJS, I end up with a blank page. Laravel route Route::ge ...
I am currently working on a Laravel 5.0 project that needs to be tested on servers supporting different PHP handlers such as: 1. suPHP (Single user PHP) 2. FCGI (FastCGI) 3. CGI (Common Gateway Interface) 4. DSO (Dynamic Shared Object) The project ru ...
Currently, I am expanding the AuthController by adding more fields, all of which are functioning well except for a link to the user's avatar (a URL approximately 150 characters long). The code snippet is as follows: return User::create([ 'firs ...
In my current project, I am developing a Single Page Application (SPA) using vuejs with vuetify and integrating authentication via a laravel/passport API. The challenge I'm facing is related to conditional rendering of navigation icons based on user authen ...
I have come across a challenge with Eloquent Relationships that I need help with. I have two models, User (pre-existing in Laravel) and Role (which I created). In the migration for these models, I added role_id as an additional column because I want every ...
Currently experiencing pagination issues in an Angular5 and Laravel5 project. The JSON values are as follows: { "products": { "current_page": 1, "data": [ ... ], "first_page_url": "http://localhost:8000/api/ ...
Just dipping my toes into the world of Laravel and I've encountered a little query. I want to set it up so only the original Creator/Owner of a post can make changes like editing, viewing, or deleting it. Each Post is linked to a User, where each Us ...
Hey there! I'm encountering an issue with storing and retrieving sessions during login processes. After successfully storing the session in one page, it appears as null when trying to access it on the next page. The permissions for the storage folder ...
Laravel, by default, saves the log file to a single file named laravel.log in the location /storage/logs/laravel.log My query is how can I generate a new log file every day and store them with filenames like /storage/logs/laravel-2016-02-23.log which repr ...
I'm a beginner in vue js. Within our app, we have implemented validation to check if a value already exists in the database. I would like to enhance this feature by making it dynamic. To achieve this, I have added a data attribute to my field which is upda ...
I have a dropdown menu that I want to use to display input files from the database based on the selection made. Here is the scenario: When a dropdown option is chosen, it should show input files derived from the "loop_atachment" table (based on the select ...
Currently, I am working on a project that involves establishing a many-to-many relationship between two tables. In my model class, I have created a method to handle this relationship. However, whenever I try to invoke this method from my controller, it thr ...
I successfully set up authentication using the Make::Auth method. Everything was working fine until I installed passport and encountered an error that said "page expired" when attempting to login. The login function is not working as expected, so any assis ...
We previously used session guard for authorization and found it sufficient. Now, we are in need of adding authorization through tokens (either in headers or GET parameters) while still using session authorization on the same routes. The token-based autho ...
Currently, I am in the process of setting up phpspec within a Laravel project. After successfully installing phpspec, I have been able to run it within my project without encountering any issues. Within my composer.json file, the relevant lines are as fo ...
I am currently working on a form where users are required to select one answer from each question using radio buttons. The loop logic allows for the selection of one answer per question. <form method="POST" action="{{url('quiz/check')}}" {!! ...
<div class="form-group"> <label for="amount_due" class="col-sm-4 control-label">{{trans('sale.amount_due')}}</label> <div class="col-sm-8"> <p class="form-control-static">Unique text to be added here</ ...
Here is the code snippet I am working with: <?php $url_constructor = "http://myecommerce.dev/edit/article_name/article_id"; $cart_line_link = str_replace($url_constructor, array( 'article_id', 'article_name' ) , array( $ ...
I have a list of posts with a "created_at" column. I am looking to only retrieve posts that are within 10 minutes old based on their creation time. I have come across many examples of using whereBetween, but they all involve passing values through inputs ...
I've recently transitioned from using localhost to Homestead (homestead.app) with Laravel 5. While everything was working fine with laravel Auth on localhost, I am now facing issues with connecting to the database on Homestead. Are there any configuratio ...
I've been attempting to utilize the package below for generating PDFs. https://github.com/spatie/browsershot Node is correctly set up: C:Users>node -v v10.16.3 However, I'm facing difficulties making it work with Laravel and browsershots. Here's t ...
To ensure our project stays current and can benefit from the latest developments, we made the upgrade from Laravel 5.1 to 5.2 yesterday. After spending some time tweaking our codebase, everything appears to be functioning normally, except for the fact that ...
I am encountering an issue while using vue2-editor and importing Quill modules, despite registering them as instructed. The error message states that window.Quill is undefined. Even after attempting to include window.Quill and Quill with webpack plugin mi ...
I have created a middleware and I need it to pass the variable $role to the route.php file. public function handle($request, Closure $next) { if ($this->auth->check()) { $role= "normal"; $user_roles = AssignedRoles::join(&ap ...
Could someone please assist me with reloading the page after a successful member login? Here is my code, but the page doesn't seem to reload. Please note that I am using Laravel 5.4. $.ajax({ url: 'json/login', ...