Download the PHP package zachleigh/fake-better without Composer
On this page you can find all versions of the php package zachleigh/fake-better. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zachleigh/fake-better
More information about zachleigh/fake-better
Files in zachleigh/fake-better
Package fake-better
Short Description Faker provider to use more realistic fake data, extensive Laravel support.
License MIT
Homepage https://github.com/zachleigh/fake-better
Informations about the package fake-better
Fake Better
Because Lorem Ipsum sucks sometimes.
Contents
- About
- Install
- Usage
- Laravel Support
- Contributing
About
This package lets you define real copy to use in Faker instead Lorem Ipsum. You only need to add the included Copy Faker provider to Faker.
Install
This pacakge requires Faker.
Install via composer:
If using Laravel, see the Laravel Support section.
Once installed, you need to add the FakeBetter\Providers\Copy
provider to your
Faker instance:
Usage
In the set copy path, define any file structure you like. All files must be php files
and should return an array. To access your custom copy, use the copy
method and
pass it a dot separated path to your copy:
If the defined copy is an array, a random value will be returned.
Laravel Support
If using Laravel, register the service provider:
Override the default paths by importing the config:
Create new copy files:
In addition to the Copy provider, this package also allows you to easily create custom Faker providers:
Contributing
Contributions are more than welcome. Fork, improve and make a pull request.
For bugs, ideas for improvement or other, please create an issue.