https://github.com/bastinald/laravel-automatic-migrations
Automatic migrations for your Laravel models.
composer require bastinald/laravel-automatic-migrations
Declare a migration
method in your Laravel models:
public function migration(Blueprint $table)
{
$table->id();
$table->string('name');
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
}
Run the migrate:auto
command:
php artisan migrate:auto
Make a model with a migration
method included:
php artisan make:amodel {name}
Make a factory whose definition
points to a model:
php artisan make:afactory {name}
Run automatic migrations:
php artisan migrate:auto {--fresh} {--seed} {--force}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community