Download the PHP package laravel-shift/factory-generator without Composer
On this page you can find all versions of the php package laravel-shift/factory-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-shift/factory-generator
More information about laravel-shift/factory-generator
Files in laravel-shift/factory-generator
Package factory-generator
Short Description Generate factories from existing models
License MIT
Informations about the package factory-generator
Laravel Model Factory Generator
This package generates model factories from existing models using the new class-based factories introduced in Laravel 8.
Installation
You may install this package via composer by running:
The package will automatically register itself using Laravel's package discovery.
Usage
This package adds an artisan command for generating model factories.
Without any arguments, this command will generate model factories for all existing models within your Laravel application:
Similar to Laravel, this will search for models within the app/Models
folder, or if that folder does not exist, within the app
folder.
To generate factories for models within a different folder, you may pass the --path
option (or -p
).
To generate a factory for a single model, you may pass the model name:
By default nullable columns are not included in the factory definition. If you want to include nullable columns you may set the --include-nullable
option (or -i
).
Attribution
This package was original forked from Naoray/laravel-factory-prefill by Krishan König.
It has diverged to support the latest version of Laravel and to power part of the automation by the Tests Generator.
Contributing
Contributions should be submitted to the master
branch. Any submissions should be complete with tests and adhere to the Laravel code style. You may also contribute by opening an issue.