I hope to help:
All Laravel documentation is here: https://laravel.com/docs/5.8/installation
To create Migration, use the following command:
php artisan make:migration create_nomedatabela_table
When creating Migration, you will notice that the up() and down() functions will be created.
In the up() function, you will place the table fields. Below a small example:
public function up()
{
Schema::create('flights', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('airline');
$table->timestamps();
});
}
After all Migrations created, to run them use:
php artisan migrate
The documentation for Migrations is here: https://laravel.com/docs/5.8/migrations
==============================================================================
An interesting way for you to perform Migration automatically is by using this Xethron/Migrations-Generator
To install the package use the command:
composer require --dev "xethron/migrations-generator"
Then paste these lines of code into the file config/app.php
:
Way\Generators\GeneratorsServiceProvider::class,
Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class,
How to use:
You create your tables in your database, as you are used to, and then execute the commands;
a) to create ALL tables in the database:
php artisan help migrate:generate
b) To create specific tables:
php artisan migrate:generate table1,table2,table3,table4,table5
I hope I’ve helped.
Hug
I think you can start by getting what you want: https://www.youtube.com/watch?v=EDNYywKZ6jc
– Miguel
perfect this guy video helped a lot
– Igor De Moraes Sampaio
Sounds like a pretty unusual requirement, make sure you’re not going through the "xy problem"
– Flávio Santos