PHP code example of glasscode / persian-faker
1. Go to this page and download the library: Download glasscode/persian-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/ */
glasscode / persian-faker example snippets
$faker = \GlassCode\PersianFaker\PersianFaker::create();
// simple text
$faker->text()->word() //ساعت
$faker->text()->sentence() //تاریخ دو بار تکرار میشود : یکی به صورت تراژدی و دیگری به صورت کمدی.
$faker->text()->paragraph() // متن طولانی
// locations type
$faker->location()->state() //تهران
$faker->location()->country() //آفریقای جنوبی
$faker->location()->address() //خیابان آزادی ،نبش خیابان رودکی
// payments info
$faker->payment()->bank() //بانک صادرات
$faker->payment()->sheba() //IR222858082460621046509226
$faker->payment()->cardNumber() //4563440120604719
// Person info
$faker->person()->job() //آرایشگر
$faker->person()->name() //علی
$faker->person()->lastName() // کریمی
$faker->person()->certificate() //لیسانس
$faker->person()->email() //[email protected]
$faker->person()->phone() //09222770548