marabesi / silex-faker-provider
Faker Service Provider for Silex
dev-master
2017-03-08 00:02 UTC
Requires
- fzaninotto/faker: ~1.4
- silex/silex: ~2
Requires (Dev)
- emanueleminotto/faker-placehold-it-provider: ~1.0
- fzaninotto/company-name-generator: dev-master
- phpunit/phpunit: ~4.4
- squizlabs/php_codesniffer: 2.*
This package is not auto-updated.
Last update: 2024-11-04 11:47:54 UTC
README
A Faker service provider for Silex 2, inspired in EmanueleMinotto/FakerServiceProvider
How to instal
Install Silex using Composer. Install the FakerServiceProvider adding marabesi/faker-service-provider
to your composer.json
$ composer require marabesi/faker-service-provider
Usage
use Marabesi\FakerServiceProvider\FakerServiceProvider; $app['locale'] = 'it_IT'; $app->register(new FakerServiceProvider(), array( 'faker.providers' => array( 'CompanyNameGenerator\\FakerProvider', // add here the provider that you need ), ));
Start to use it
$app->get('/hello', function () use ($app) { return 'Hello ' . $app['faker']->name; });