mcmatters / laravel-factory-generators
v1.1
2020-06-13 20:56 UTC
Requires
- php: >=7.0
- composer/composer: ^1.5
- doctrine/dbal: ^2.5
- illuminate/config: ^5.2 || 6.* || 7.*
- illuminate/console: ^5.2 || 6.* || 7.*
- illuminate/database: ^5.2 || 6.* || 7.*
- illuminate/filesystem: ^5.2 || 6.* || 7.*
- illuminate/support: ^5.2 || 6.* || 7.*
Requires (Dev)
- fzaninotto/faker: ~1.4
README
为模型的所有未创建的工厂生成器生成工厂。
安装
composer require mcmatters/laravel-factory-generators
在你的 config/app.php 文件中包含服务提供者。
'providers' => [ McMatters\FactoryGenerators\ServiceProvider::class, ]
发布配置。
php artisan vendor:publish --provider="McMatters\FactoryGenerators\ServiceProvider"
然后打开 config/factory-generators.php 并配置你的模型所在路径。
高级配置
用法
只需运行命令 php artisan factory:generate。