The Artisan migrate:make command is designed to create the skeleton file for you, so that you can then add in the required fields easily.
Migrate:make accepts two parameters that alter what is created:
Adds the code for creating a new schema called 'table_name'.
Adds the code to define the table name.
Neither does anything more complicated than that. Migrate can't infer the structure of the table - you have to define the columns and their properties manually within the up() function. Using --create and --table grants you a shortcut in writing in the names and create syntax.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us