I have a model named “Rate” and a related controller named “RateController”. if want to make a custom query in Rate model, we could use local scope or static function like these: using static …
Tag: laravel
How to append or attach a pivot relationship to a model?
I am trying to get the practice area record of lawyers from practice_areas table along side each time I get a lawyer’s record from lawyer_profiles_table. This two tables (practice_areas and …
What’s the problem of using Password Grant Tokens for Nuxt SPA
I want to develop a Nuxt SPA with Laravel as backend. Read the Passport document and now confused about the following paragraph because I don’t want to redirect the user to backend login page: …
ArgumentCountError Too few arguments to function 0 passed and exactly 1 expected in Laravel
I’m trying to update a record in my laravel application In my app management blade I have a link to a single record
Laravel 6: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
everyone! I need some help. I’m creating a web app in laravel 6 that lets the user insert data through php forms that is also inserted into a database. Basically, I create a Supplier (it’s working), …
laravel 6 login successfully but redirect to login page
My environment is MAMP server on MACOS. LoginController.php public function authenticate(Request $request) { $this->validate($request, [ ’email’ => ‘required|email’, …
Integrity constraint violation in laravel
I am passing the ID in URL to get to the Form Page I want but I want to pass in the same ID when I hit the submit button and I want to pass in the same ID to the database table name “created_by” …
Cannot add or update a child row: a foreign key constraint fails – Laravel 7
I’m trying to add a relationship 1:1 between my Visitor & Contact When run I kept getting Answer In the latest versions of laravel the primary key is biginteger. so you might have to change this $table->integer(‘visitor_id’)->unsigned(); with this $table->bigInteger(‘visit…
Laravel AbstractVariables.php line 54 Expected name to be a string
I am using Laravel 6 with visual studio code. The last successfully command i run is given below with their out put. But after that, whatever command i do execute it gives me an error I have tried to execute given below commands, but all of these ends up with above mentioned error. I have tried to find out fi…
How to resolve null return in Laravel query?
Given my Models Person and Student. Now, one of my controller is doing this: $person_id = AppModelsPerson::insertGetId([‘name’ => $request->name, …]); AppModelsStudent::create([‘…