Create a Migration

Database migrations are the easiest way to setup tables and their columns. Fortunatelly Laravel can take care of all of this really easily.

You can use Artisan from the command line to create a new migration, which will create a migration class for you, where you can enter all the tables and everything you may need.

How to Create a Database Migration

The first thing you have to do is run the Artisan command from the command line. This command will create a file that contains the migration class.

The most basic command to try is:

php artisan make:migration your_migration_name

If you want Artisan to prefill the migration with a table or more for you, you can use the --table option:

php artisan make:migration your_migration_name --table=users

But you can also let Artisan know that you want to create a new table by using the --create option:

php artisan make:migration your_migration_name --create=users

My recommendation is to always use migration for any database necessities, because it's easier, it looks better and you will always have a history of the database changes.