2017 © Pedro Peláez
 

project fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

image

zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  • Tuesday, April 17, 2018
  • by zachleigh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Fake Better

Because Lorem Ipsum sucks sometimes., (*1)

Contents

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., (*2)

Install

This pacakge requires Faker., (*3)

Install via composer:, (*4)

composer require zachleigh/fake-better

If using Laravel, see the Laravel Support section., (*5)

Once installed, you need to add the FakeBetter\Providers\Copy provider to your Faker instance:, (*6)

use Faker\Generator;
use FakeBetter\Providers\Copy;

$faker = new Generator();

$copyProvider = new Copy($faker);

$copyProvider->setCopyPath('path/to/copy/directory');

$faker->addProvider($copyProvider);

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:, (*7)

$faker->copy('path.to.copy');

If the defined copy is an array, a random value will be returned., (*8)

Laravel Support

If using Laravel, register the service provider:, (*9)

FakeBetter\Laravel\ServiceProvider::class

Override the default paths by importing the config:, (*10)

php artisan vendor:publish --provider="FakeBetter\Laravel\ServiceProvider" --tag="config"

Create new copy files:, (*11)

php artisan make:faker-copy my/original/copy/file

In addition to the Copy provider, this package also allows you to easily create custom Faker providers:, (*12)

php artisan make:faker-provider CustomProvider

Contributing

Contributions are more than welcome. Fork, improve and make a pull request., (*13)

For bugs, ideas for improvement or other, please create an issue., (*14)

The Versions

17/04 2018

dev-master

9999999-dev https://github.com/zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zach Leigh

laravel testing faker custom copy real copy faker provider

17/04 2018

v0.1.3

0.1.3.0 https://github.com/zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zach Leigh

laravel testing faker custom copy real copy faker provider

16/04 2018

v0.1.2

0.1.2.0 https://github.com/zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zach Leigh

laravel testing faker custom copy real copy faker provider

16/04 2018

v0.1.1

0.1.1.0 https://github.com/zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zach Leigh

laravel testing faker custom copy real copy faker provider

15/04 2018

v0.1.0

0.1.0.0 https://github.com/zachleigh/fake-better

Faker provider to use more realistic fake data, extensive Laravel support.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zach Leigh

laravel testing faker custom copy real copy faker provider