To set up a Docker environment for Laravel, follow these steps:
- Clone the Laradock repository by running the following command:
git clone https://github.com/Laradock/laradock.git environment-laradock
- Install Laravel 10 by running the following command:
composer install
- Add the necessary templates and tables by running the following commands:
php artisan migrate
php artisan db:seed
-
Create an API for CRUD operations on the User model.
-
Create a tool to manage the User table.
To access the Docker workspace, run the following command:
docker exec -it --user laradock environment-laradock-workspace-1 bash
That's it! You now have a Docker environment set up for your Laravel project.
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
http://localhost:8081/?server=mariadb&username=root&db=laravel&password=root
https://github.com/remix-run/react-router/blob/dev/examples/auth-router-provider/src/App.tsx