How can you create migrations from an existing database automatically in Laravel 5.4? i found this link
https://github.com/Xethron/migrations-generator
but they are asking me not to be like that. Do not create other files for the foreign keys and another for the tables. Someone knows?
for example you create migrations like this
Schema::create('flights', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('airline');
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users');
});
There it creates the relationships and migration file of an existing database
I was able to solve that problem.
in this link
https://github.com/beckenrode/mysql-workbench-export-laravel-5-migrations
is a plugin to automatically create migrations in Laravel 5.4 from an existing database. I also leave a link of the explanation of the process
https://youtu.be/7ZFJpuHldWo
I hope I have been of some help with that.