Category "laravel"

How to filter all fields data by one time without auto using button in lara classifer(Laravel,php)

Guys i'm currently working with lara classifer project and filtering method filter data when we select each radio button or dropdown.I want to make a button tha

How to filter User by role based on the called Model?

I'm using Laratrust to manage these roles: Patient Doctor I've a class called User which is the main entity, then I have a specific class for each role: Patient

how to add code to service provider by artisan command

i created an Artisan Command that created Repository. A Repository File and an Interface. when user run below command, this files will be generated. php artisan

Addition of function to create banner on management screen

I have a site built with Laravel, and I would like to add the function to create a banner to be placed on that site to the management screen. The requirements a

Spatie laravel-backup giving undesired file structure inside the output zip

I installed spatie/laravel-backup version 6.16 and haven't changed anything inside the backup.php file. When I do php artisan backup:run I got the timestamp zip

Nuxt image keeps breaking on page change

I have image displayed on my Nuxt page but anytime I navigate away from it back the image breaks and I do not know why. I have this in my code <img :src="bas

Difference between save, fill, create in laravel eloquent

So i am new to laravel, I don't know the difference between save, fill and create in laravel eloquent. can anybody describe it?

updateOrCreate Function in laravel

Code is fine and I'll double check my code but I didn't find anything wrong in my code. This doesn't update or insert address or new user data in any condition.

Laravel relationship HasMany

I keep multiple address records belonging to a user. but when i write with dd i can't access other table's data. Following my code: user Table id | name

Laravel chat app : Unable to deliver messages to a specific user

I have been trying to develop a chat app on Laravel with socket.io. Now, I am facing problem that is when a user is sending a message to a specific user, the me

Laravel backpack fields - select_from_array functionality

I am using laravel backpack. Have created a new Request form. Have created several fields to choose from using 'select_from_array': $this->crud->field('ra

dynamic select2 options depending on other select's selected option

I have the following select <select class="form-control" id="from-location" name="from-location"> <option value="1">Inventory 1</option&g

Larael/Vue/JS minimalize/lost focus/changed card alert

Im coding web page and i need to know when user minimalize window/ lost focus on window/ changed card in browser. Is there any function which can give me that i

Message: Trying to access array offset on value of type int

How to resolve this issues: Trying to access array offset on value of type int? PHP8 public function processPayment(Request $request) { $orders

run migration for different database connections

i have two mysql connection and i want to migrate specific database with php artisan migrate --database=databasename and when i ran command php artisan migrate

Creating default object from empty value in Laravel 8

For some reason, I still get a warning message: Creating default object from empty value. Product controller public function update(Request $request, $id) {

Return json response in ajax request laravel

I have the following ajax code in my frontend. var formData = $('#application-information-step-one').serialize(); var actionUrl = $('#application-informatio

how to support Promises in Internet Explorer 11 using laravel mix?

I'm trying to figure out how to get laravel-mix to convert ES6 javascript code into javascript code Internet Explorer 11 can use. I've setup a brand new laravel

Test multidimensional array with Laravel and Pest

I have a little problem when I want to test an array in my unit test. I want to test both structure and type of keys, but I don't know how to process it (I trie

How to Connect to Database SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

I got this error when i tried to connect to my database: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) (SQL: select act