- Download and extract the zip file.
- Run
composer installfrom command line. - In case of any problems you may need to run
composer updatefirst. - Copy
.env.exampleto.env. - Run
php artisan key:generatefrom the command line. - Migrate: Run
php artisan migratefrom the command line. This wil also create the SQLite database. - Seed: Run
php artisan db:seedfrom the command line. - Vite:
npm run dev. php artisan serve
The repository is structured with separate commits for each exercise in the Eloquent - Being relatable module. This allows you to review each stage of the module independently, making it easier to provide targeted feedback. Please refer to the specific commits to see the progress and implementation details for each of the four exercises.
- Copy project from last exercise
- Created 3 requests:
StoreBookRequest & UpdateBookRequest & DeleteBookRequestand moved validation-logic from controller. Bookscontroller: Add the requests to the parameters of the controller methods.
- Updated
TIMESTAMP_create_books_table-migration adduser_idwith default value1. - In the Requests
authorize()checks if theBook->user_id===1.