PHP code example of fakerino / nette-fakerino
1. Go to this page and download the library: Download fakerino/nette-fakerino 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/ */
fakerino / nette-fakerino example snippets
namespace App\Presenters;
use Nette,
App\Model;
use Fakerino\Core\FakeDataFactory;
/**
* Homepage presenter.
*/
class HomepagePresenter extends Nette\Application\UI\Presenter
{
/**
* @var \Fakerino\Core\FakeDataFactory
*/
private $fakerino;
public function __construct(FakeDataFactory $fakerino)
{
$this->fakerino = $fakerino;
}
public function renderDefault()
{
$this->template->surname = $this->fakerino->fake('surname');
}
}