Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hydreflab/laravel-jedi-faker
JediFaker binding into Laravel factories
https://github.com/hydreflab/laravel-jedi-faker
faker faker-extensions faker-generator faker-provider jedi laravel laravel5 laravel5-package library php7 star-wars
Last synced: about 1 month ago
JSON representation
JediFaker binding into Laravel factories
- Host: GitHub
- URL: https://github.com/hydreflab/laravel-jedi-faker
- Owner: HydrefLab
- License: mit
- Created: 2018-01-15T18:59:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-16T15:39:32.000Z (almost 7 years ago)
- Last Synced: 2024-09-28T19:03:25.065Z (about 1 month ago)
- Topics: faker, faker-extensions, faker-generator, faker-provider, jedi, laravel, laravel5, laravel5-package, library, php7, star-wars
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 25
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Package provides simple [JediFaker](https://github.com/HydrefLab/jedi-faker) binding into Laravel factories.
JediFaker is an extension for Faker data generator. It does not affect original Faker in any way.
## Installation
```sh
composer require hydreflab/laravel-jedi-faker
```## Service provider registration
No service provider registration in `app.php` is needed. Package uses Laravel auto discovery feature.
However, if for some reason you don't want to use auto discovery, disable that in your application's `composer.json` file:
```json
"extra": {
"laravel": {
"dont-discover": [
"hydreflab/laravel-jedi-faker"
]
}
},
```
Then manually register `HydrefLab\Laravel\JediFaker\JediFakerServiceProvider::class` service provider.## Basic usage
New features added by JediFaker package can be used straight away in your Laravel factories:
```php
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->character,
'email' => $faker->unique()->safeEmail,
'planet' => $faker->planet,
'species' => $faker->species,
'vehicle' => $faker->vehicle,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
```For more details, check [JediFaker repository](https://github.com/HydrefLab/jedi-faker).
_Note: JediFaker package only adds new formatters and is not extending/overriding Faker generator,
therefore IDE autocompletion will not work for newly added features._## Copyright and license
Package is licensed for use under the MIT License (MIT). Please, see [LICENSE][] for more information.
[license]: https://github.com/hydreflab/laravel-jedi-faker/blob/master/LICENSE