Running Database Migrations - steve-mt/laravel-docker GitHub Wiki
Prerequisites
This expects you to know how to run artisan commands which documentation about can be found here
- First thing you need to fix id your enviorment varaibles for the database by default you have some like this in your
.env
file.
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
You will have to change all of the values by default you have to change the values like this.
DB_HOST=db
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=laravel
Now all you need to do is run php artiasn migrate
and it should migrate to the database.
To learn how to query the database check the documentation here