Migration with custom fields in Laravel

1

I'm not sure what to do,

Is there a way to create fields in my Model and when running the Migration framework automatically create these fields in my Up method? In the documentation and tutorials that I see, it is always necessary to change the migration class and enter the fields manually.

In ASP.NET MVC, migration automatically creates the fields according to my Model class.

Is this possible in Laravel?

Example, class with "Name, Phone" fields. The Up method would automatically create the

$table->string('nome'); $table->string('telefone');
    
asked by anonymous 19.01.2018 / 14:06

0 answers