PHP code example of erdnaxelaweb / staticfakedesign

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

    

erdnaxelaweb / staticfakedesign example snippets


return [
    // ...
    ErdnaxelaWeb\StaticFakeDesignBundle\StaticFakeDesignBundle::class => ['all' => true],
];

// Example usage in a controller
public function exampleAction(ChainGenerator $fakeGenerator)
{
    $fakeArticle = $fakeGenerator->generate('content', ['type' => 'article']);
    
    return $this->render('example.html.twig', [
        'article' => $fakeArticle
    ]);
}