PHPackages                             fakerino/nette-fakerino - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. fakerino/nette-fakerino

ActiveLibrary[Testing &amp; Quality](/categories/testing)

fakerino/nette-fakerino
=======================

Nette extension for Fakerino

0.0.2(10y ago)2511MITPHPPHP &gt;=5.3.0

Since Jun 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Fakerino/nette-fakerino)[ Packagist](https://packagist.org/packages/fakerino/nette-fakerino)[ RSS](/packages/fakerino-nette-fakerino/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Fakerino Nette
==============

[](#fakerino-nette)

[![Latest Stable Version](https://camo.githubusercontent.com/b8ce8dd8cda14b56c8d2cf5cfe76fd654af806c097368e49df95949e1e0d377d/68747470733a2f2f706f7365722e707567782e6f72672f66616b6572696e6f2f6e657474652d66616b6572696e6f2f762f737461626c652e737667)](https://packagist.org/packages/fakerino/nette-fakerino)[![License](https://camo.githubusercontent.com/7c9ee425275ce21ba1b684a693efa805162deb9757b830d6d125955757430fe5/68747470733a2f2f706f7365722e707567782e6f72672f66616b6572696e6f2f6e657474652d66616b6572696e6f2f6c6963656e73652e737667)](https://packagist.org/packages/fakerino/nette-fakerino)

Provides an easy way to include [Fakerino](https://github.com/Fakerino/Fakerino) in [Nette framework](http://nette.org/en/) as a service.

More information in the [official documentation](http://www.fakerino.io).

Installation
------------

[](#installation)

Add the following dependencies to your projects composer.json file:

```
    "require": {
        "fakerino/nette-fakerino": "0.0.*",
    }
```

### Install the [Open Data Sample](https://github.com/niklongstone/open-data-sample) in two ways:

[](#install-the-open-data-sample-in-two-ways)

- Add a script to your composer.json:

```
  "scripts": {
        "post-install-cmd": "vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data",
        "post-update-cmd": "vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data"
    }
```

In this way the data will be always updated automatically via composer.

- Run maually the command (after the fakerino composer installation): `$ vendor/fakerino/fakerino/build/ods vendor/fakerino/fakerino/data`

### Configuration

[](#configuration)

Add in your config.neon the service definition as below:

```
services:
	fakerino:
	    class: Fakerino\Core\FakeDataFactory
	    factory: Fakerino\FakerinoNette\FakerinoServiceFactory::create

```

In order to customise the Fakerino default configuration you could add `fakerino` in your config.neon parameters.

```
parameters:
    fakerino:
        locale: cs-CZ
        fake:
            fakeMale:
              - titlemale
              - nameMale
              - surname
            fakeFemale:
              - titlefemale
              - namefemale
              - surname
        database:
            dbname: mydb
            user: username
            password: password
            host: localhost
            driver: pdo_mysql

```

### Presenter example

[](#presenter-example)

```
