I am new to Laravel, here my existing fields are getting updated but unable to insert a new row, when users checks for a new category it should be added as a new row in the database. public function …
Tag: laravel
jwt-auth after upgrade – get user from request token
I upgraded: “tymon/jwt-auth”: “0.5.*”, from a very old version, and it seems like the API has changed. I managed to fix the login, using: public function login(Request $request) { $…
“From 10 to 20 March 2020” i need this date format from two dates
I have a start date and end date. From those dates i need to print the dates in the below formats.For example: Start Date:10/03/2020 End Date:20/03/2020 Needed Format : From 10 to 20 March 2020 …
Laravel 6.5.1 migration Errno: Syntax error or access violation 1064
I tried to do the migration and I ran into this error: Syntax error or access violation 1064. I looked at other similar problems but I couldn’t find the solution to this problem. Please help, and …
Select field Old value cannot be displayed in laravel
I’m having a user registration form with a select field, When ever I get an error on the form user redirected to the form and display the previously entered values I able to display old values for …
How to know the controller and method name inside blade file in Laravel 6?
I am new to Laravel. I was practicing setting up a blog in Laravel 6. I have a layout.blade.php file where all the basic HTML is written. In the content section of the layout.blade file, I want to @…
How to pass multiple array in response – Laravel API
I am creating my API for mobile app in Laravel. I am facing an issue where I have to pass two arrays as json but it shows error. Here is the code which I am using public function showSearchPage($…
Laravel Eloquent Relationship between users table and states table with states_id in users table
I am trying to figure out relationships in laravel and have come to the end of my rope so I thought I would post my very first question here in hopes of figuring it out. I can generally find the …
Larave noting save hash password in database
My need create new user in admin dashboard, this store function, but database saving string not hash, please help. When I output via dd(), then the hash working ` public function store(Request $…
What is the difference between a JsonResource & ResourceCollection? in Laravel v6 or v7
Can someone explain the difference between a ResourceCollection and JsonResource? In Laravel 6 docs you can generate 2 different types of resources… ResourceCollection and JsonResource. https://…