At first my code works fine with just one parameter when querying, but when I add more parameters, it start to throw errors. Here is MyEditController file: Here is my web.php : Here is my Blade: Here is My Controller: When I adding Some Parameter using this code it start showing error: When I filter it with d…
Tag: laravel-9
Laravel 9 composer syntax error, unexpected token “)”
After in my Laravel 9 project I run composer update I faced this error message: It seems update was finished, but something went wrong and now in the console I get syntax error, unexpected token “)” error on Finder.php:588. I checked this file and it’s looks correct. When I open my project i…
Laravel Http Client add api key into request
On my Laravel project (laravel version 9) I have to connect on a third part api using an apikey on the url and I have to get the response in json format. To not having to repeat the same code over and over and over I’m trying to use the Http Client Macro for setting the base url, make sure
Problem at startup laravel9 system after git clone
After I made a git clone with my project, composer install and everything and php artisan serve I’m just getting three lines of footers like this: 2022 © Webshooter LM AB | Du använder version 4.1.9 | Laravel 9.12.2 screendump: https://imgur.com/Lyt5IhS If I change http://localhost:8000/app/ to http://l…
Compare two columns from two related tables using scopes in Laravel 9
I’m trying to create a scope that will compare two columns on two related tables. Based on these tables I would like to be able to get all instances of the ServiceCall model where the next_service_date is within the next 15 days, where the Customer model either has a null value for the last_contact_date…
Laravel : get only the clicked image to display, and not all of them
Yo everyone! I’m actually working on a lil’ project to learn laravel and here is the thing I struggle to achieve : I want the image I click on to be displayed in a view, but not all of my images (my images are stored in a database). I think the code is pretty simple, I’ll share it with you
Check if data updated_at 24 hours ago OR a day ago (laravel)
I am able to get days ago for each row in dattable using carbon. (view CustomController.php) But before the user is able to edit the data. I want to check if the data is updated a day ago or 24 hours ago. if 24 hours or a day passed user can’t update the data if it is within 24 hours
Unable to retrieve data stored on Laravel session on subsequent requests
I am writing a programme that requires a multi-step form before all the validated data will be stored in the database. For instance, Users have to provide their personal information before proceeding to the next step, and I want the validated data to be stored as a session up till the user completed its regis…
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row in Laravel9
I have an integrity constraint violation when I run the php artisan db:seed command in Laravel 9. Error PDOException::(“SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (hunger-db.restaurants, CONSTRAINT restaurants_user_id_foreign FO…
Laravel 9 html form submit throws 405. Expects PUT, request is GET
I’m trying to create a simple CRUD application with Laravel 9. I’ve run into a problem with HTML forms. I’ve created a page where you can edit data on rabbits existing in my database. My form web.php routes RabbitController.php Before I even hit the controller I get an exception reading: The…