Download the PHP package chinleung/laravel-factory-builder without Composer
On this page you can find all versions of the php package chinleung/laravel-factory-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chinleung/laravel-factory-builder
More information about chinleung/laravel-factory-builder
Files in chinleung/laravel-factory-builder
Package laravel-factory-builder
Short Description A package to use factories like an Eloquent builder.
License MIT
Homepage https://github.com/chinleung/laravel-factory-builder
Informations about the package laravel-factory-builder
Laravel Factory Builder
A package to allow you to use your factories like an Eloquent builder inspired from Tighten.
Installation
You can install the package via composer:
Configuration
By default, the builder will fetch the models from App\\
namespace if none has been provided in your builder.
Quick Usage
Basic
Real-Time Facade
Methods
The builder comes with a few methods available for you to use.
create(int $count = null)
Create one or more instances of the model.
make(int $count = null)
Create one or more instances of the model without saving it in the database.
created(Model $model): Model
Hook to alter the model after it has been created. For instance, creating relationships related to the model.
setProperty(string $property, $value): self
Set a property for the creation of the model.
getProperties(): array
Retrieve the properties used for the model creation.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Chin Leung
- All Contributors
License
The MIT License (MIT). Please see License File for more information.