PHP code example of hydreflab / jedi-faker

1. Go to this page and download the library: Download hydreflab/jedi-faker 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/ */

    

hydreflab / jedi-faker example snippets


// use provided factory to create generator with already registered providers
$faker = HydrefLab\JediFaker\Factory::create();

// or use Faker factory and manually register new providers
$faker = Faker\Factory::create();
$faker->addProvider(new HydrefLab\JediFaker\Provider\Character($faker));
... // add other providers

$faker->darkSide;            // Darth Vader
$faker->quote;               // No. I am your father.
$faker->quote('han_solo');   // Never tell me the odds!
$faker->droid;               // R2-D2
$faker->episode;             // Episode VIII: The Last Jedi
...