Mahmoud Khosravi
Mahmoud Khosravi

Reputation: 496

How to create factory in laravel with modules?

I installed composer require nwidart/laravel-modules package in my project.

I created Transaction modules and I want to create a factory, How to use it?

php artisan module:make-factory TransactionFactory Transaction

Upvotes: 0

Views: 1227

Answers (1)

reza khademi
reza khademi

Reputation: 464

First, you should create a factory:

php artisan module:make-factory FactoryName Blog

Second, load your factory to the provider.stub (provider.stub)

Third, use this command: php artisan module:seed

Upvotes: 1

Related Questions