Command: PHP artisan make: factory FactoryName
ex: PHP artisan make: factory ProductFactory or you can make it during creating Model
PHP artisan make: model ModelName --all (it creates a model, controller, factory, seeder, and migration)
in this case, we are creating a factory for Product so we put Product in the place of the model name
D:\www\crm (main)
λ php artisan make: factory RolesFactory --model=Role
Factory created successfully.
It generates a blank factory file
No comments:
Post a Comment