1. Go to this page and download the library: Download geekish/faker-providers library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
geekish / faker-providers example snippets
use Faker\Generator;
$faker = new Faker\Generator();
FakerProviders::register($faker);
use Faker\Generator;
use Geekish\FakerProviders\FakerProviders;
use Illuminate\Foundation\Application;
$locale = $this->app->get('config')->get('app.faker_locale', 'en_US');
$abstract = Generator::class.':'.$locale;
$this->app->resolving($abstract, function (Generator $faker, Application $app) {
FakerProviders::register($faker);
return $faker;
});
use Faker\Generator;
use Geekish\FakerProviders\Arts\Literature;
$faker = new Faker\Generator();
$faker->addProvider(new Literature($faker));
$faker->bookTitle();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.