Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adcpd/faker-bundle-symfony2
Faker is a PHP library that generates fake data for you
https://github.com/adcpd/faker-bundle-symfony2
Last synced: about 7 hours ago
JSON representation
Faker is a PHP library that generates fake data for you
- Host: GitHub
- URL: https://github.com/adcpd/faker-bundle-symfony2
- Owner: ADCPD
- Created: 2016-11-24T16:09:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-24T16:27:08.000Z (about 8 years ago)
- Last Synced: 2024-11-12T00:34:53.857Z (2 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Faker-Bundle-symfony2
Faker is a PHP library that generates fake data for you
# AppKarnel.php : Config[df1]public function registerBundles()
{
$bundles = array(
...
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
...
$bundles[] = new Administration\FakerBundle\FakerBundle();
}
return $bundles;
}
# Routing config: [df1]faker:
resource: "@FakerBundle/Resources/config/routing.yml"
prefix: /
# How to use : [df1]Pour appeler le service de Faker library :
/** @var $faker */
$faker = $this->getContainer()->get('faker.generator');
/** Use Exemple */
$faker->unique()->randomNumber(3) ;
$faker->numberBetween($min = 0, $max = 5)
$faker->Longitude
$faker->streetAddress
...