Download the PHP package leandrodiogenes/laravel-test-factory-helper without Composer
On this page you can find all versions of the php package leandrodiogenes/laravel-test-factory-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download leandrodiogenes/laravel-test-factory-helper
More information about leandrodiogenes/laravel-test-factory-helper
Files in leandrodiogenes/laravel-test-factory-helper
Package laravel-test-factory-helper
Short Description Generate Laravel test factories from your existing models
License MIT
Informations about the package laravel-test-factory-helper
Laravel Test Factory Generator
php artisan generate:model-factory
This package will generate factories from your existing models so you can get started with testing your Laravel application more quickly.
Example output
Migration and Model
Factory Result
Install
Require this package with composer using the following command:
Usage
To generate multiple factories at once, run the artisan command:
php artisan generate:model-factory
This command will find all models within your application and create test factories. By default, this will not overwrite any existing model factories. You can force overwriting existing model factories by using the --force
option.
To generate a factory for specific model or models, run the artisan command:
php artisan generate:model-factory User Team
By default, this command will search under the app
folder for models. If your models are within a different folder, for example app/Models
, you can specify this using --dir
option. In this case, run the artisan command:
php artisan generate:model-factory --dir app/Models -- User Team
License
The Laravel Test Factory Helper is free software licensed under the MIT license.
All versions of laravel-test-factory-helper with dependencies
illuminate/support Version ^6.0|^7.0
illuminate/console Version ^6.0|^7.0
illuminate/filesystem Version ^6.0|^7.0
doctrine/dbal Version ^2.9