I am using Laravel 8 with fortify auth without Jetstream. web.php Route::get(‘/facade_version’, function () { dd(‘EXAMPLE’); })->name(‘postcard.facade’); Above is my route index.blade.php <…
Tag: laravel
how to append a column to a model from a relationship laravel
i have a model and a relationship which i want to append a column from a relationship to the model so every time every where that the model is called that column from the relationship should be shown in model column . i want to sort the model by that column and the second problem is that the column is
laravel seeder is giving an error and won’t seed
I’ve been trying to get my seeder to work but it keeps giving me the following error Call to undefined function DatabaseSeedersfactory() at database/seeders/ContactTableSeeder.php:16 12▕ …
Laravel 8 – Handle errors on PUT form request
I want to handle errors of put request like I do on POST request. Is that possible ? Because my actual solution seems don’t work. My handling errors looks like this My form code Answer you need use validate in your controller ex:
API working well on POSTMAN but giving error in Curl PHP
I am trying to fetch the record from the api. It’s working correctly on postman but giving the error when I use curl in php. Here is my PHP Code: Here is the error I am getting after curl: error after curl option On the Postman it’s giving the result perfect as expected: postman result Furthermore…
Update price column in database laravel
I am trying to pass along updated pricing to my orders table but am getting an error: In my controller I have this: The error is coming from the $newPaymentTotal that I want use to update the price that was in there before. That column is set up as a decimal as well. Answer Your line $request->session()-&g…
Laravel/Angular “Password Expired” auth flow
I am using Laravel 7.* for my API and Angular 9 for my frontend. I am having trouble figuring out how to handle Password Expiration responses from my api. My current auth workflow is this: Angular POST /login request to API with an expired password API receives POST request, authenticates the credentials. If …
how to do not update value on update function?
i want this code should not be run if user call upate route code i am using a same fucntion to update or store order but on update i donot want to run above code i know it is very simple but i am a student and learning help me here it is controller function first user create order the
Access data from a json array
I have this type of json object coming from a curl endpoint response: i want to access full_name from that response and display it on my index.blade.php view page as a list of name like this: Please assist me to access the value from that array above. Answer You can do like this : Above code tested here
Laravel: Drop down options pulled from database in Master blade template are not showing on other pages
I have created a menu in master blade template in Laravel and have extended that to the other pages. That menu has a dropdown, with several options, that get fetched from the database. While, this works on the master template. It throws the same error on rest of the pages. How should I fix this? Here’s …