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:
--create=table_name
Adds the code for creating a new schema called 'table_name'.
--table=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.
I greatly appreciate your timely response kwaanonline. Thank you.
Now I can move forward
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community