Use Migration, Factory , Seeder In Laravel 10
Hòa Nguyễn Coder
Posted on April 6, 2024
The first. we can note 1 list command Migration in Laravel
php artisan make:migration create_products_table
//or
php artisan make:migration table_products_table --table= products
//or
php artisan make:migration create_products_table --create=products
Note
--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.
Posted on April 6, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.