Skip to content
Advertisement

Tag: laravel-9

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://localhost:8000/auth/login I come to the login page. How to prevent that and to come

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 FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE)”) setup_users_table setum_restaurants_table User Model Restaurant Model Answer I see some things to change

Advertisement