Faker Service Provider for Silex

dev-master 2017-03-08 00:02 UTC

This package is not auto-updated.

Last update: 2022-05-09 00:54:19 UTC


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


use Marabesi\FakerServiceProvider\FakerServiceProvider;

$app['locale'] = 'it_IT';

$app->register(new FakerServiceProvider(), array(
    'faker.providers' => array(
       // add here the provider that you need

Start to use it

$app->get('/hello', function () use ($app) {
    return 'Hello ' . $app['faker']->name;