Now, let's exercise some commands that we briefly saw in the first chapter and create our migrations and seeds in a different way.
- Open your Terminal window on the chapter-04 folder and type the following command:
docker-compose exec php-fpm bash
- Inside the container root bash, type the following command:
php artisan make:model Bike -m
Note that we are using the -m flag to create the migration file together with the creation of Bike Model. So now, we have two new files in our application:
- project/app/Bike.php
- project/database/migrations/XXXX_XX_XX_XXXXXX_create_bikes_table.php