PHPackages                             kasraghoreyshi/persian-faker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kasraghoreyshi/persian-faker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kasraghoreyshi/persian-faker
============================

Persian faker functions for laravel

v1.04(5y ago)103.6kMITPHP

Since Apr 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kasraghoreyshi/persian-faker)[ Packagist](https://packagist.org/packages/kasraghoreyshi/persian-faker)[ RSS](/packages/kasraghoreyshi-persian-faker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

persian-faker
=============

[](#persian-faker)

Laravel faker package persian extension

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

[](#installation)

Install the package with composer:

```
composer require kasraghoreyshi/persian-faker

```

Usage
-----

[](#usage)

You could use this package as an instance of `Faker\Generator` as you normally would use in factories.

MethodsDescription-&gt;persianWordGenerates a random persian word. Example: 'مهد'-&gt;persianWords($nb = 3)Generates a random array of persian words. Example: \["آتش","باغ","میز",\]-&gt;persianSentence($nb = 3, $variableNbWords = true)Generates a random persian sentence. Example: "محل مشک کلمه محل پیچ پل تیم صف"-&gt;persianSentences($nb = 3, $asText = false)Generates a random array of persian sentences. Example: \["محل مشک کلمه محل پیچ پل تیم صف", ...\]-&gt;persianParagraph($nbSentences = 3, $variableNbSentences = true)Generates a random persian paragraph-&gt;persianParagraphs($nb = 3, $asText = false)Generates a random array of persian paragraphs-&gt;persianText($maxNBChars = 200)Generates a random text with the given character countExample
-------

[](#example)

Below is an example of persian-faker being used in a factory.

```
