DEV Community

Cover image for Use Migration, Factory , Seeder In Laravel 10
Hòa Nguyễn Coder
Hòa Nguyễn Coder

Posted on

Use Migration, Factory , Seeder In Laravel 10

The first. we can note 1 list command Migration in Laravel
php artisan make:migration create_products_table
php artisan make:migration table_products_table --table= products
php artisan make:migration create_products_table --create=products
--table= products : open products table modify
--create=products : create product table
OR : The Artisan command to create a migration (-m), a seeder (-s), and a factory (-f) in Laravel is:
php artisan make:model Product -m -s -f
ModelName is the name of the model you want to create.
This command will generate a migration, a seeder, and a factory for the specified model as well as create the model itself.

Top comments (0)