- To use the application, you must have the following installed:
- Docker
- WSL2 (if using Windows OS)
- Clone this repository into your local machine using the terminal (Mac), CMD (Windows), or a GUI tool like SourceTree.
- Navigate into your project directory
cd <your-project-name>
- Install project dependencies using the following command:
When using the laravelsail/phpXX-composer image, you should use the same version of PHP that you plan to use for your application (81, 82 etc).
docker run --rm \ -u "$(id -u):$(id -g)" \ -v $(pwd):/var/www/html \ -w /var/www/html \ laravelsail/php83-composer:latest \ composer install --ignore-platform-reqs
- Create the .env file from the example file
cp .env.example .env
- Open the .env file and change the database configuration to the following
DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=<your-project-name> DB_USERNAME=root DB_PASSWORD=
- Start Sail in the background
sail up -d
- Generate application key
sail artisan key:generate
- Migrate database tables
sail artisan migrate --seed
- Install dependencies
npm update && npm install && npm run dev
- Go to localhost on your browser to view the application
if you are not familiar with sail command and want to run php artisan, run sail exec -it laravel.test bash
"laravel.test" will differ based on your docker image and can check using sail ps