PHP code example of alanablett / twig-faker

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

    

alanablett / twig-faker example snippets




return [
    'first_name' => $faker->firstName,
    'last_name' => $faker->lastName,
    'avatar' => $faker->imageUrl(300, 300)
];

$twig->addExtension(new Ablett\TwigFaker\TwigFakerExtension);



return [
    'first_name' => $faker->firstName,
    'last_name' => $faker->lastName,
    'avatar' => $faker->imageUrl(300, 300)
];



return [
    'title' => $faker->sentence(),
    'background' => $faker->imageUrl(1700, 600)
];