# Faker
[![Code Coverage](https://codecov.io/gh/fzaninotto/Faker/branch/master/graph/badge.svg)](https://codecov.io/gh/fzaninotto/Faker)
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.
Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/), and by ruby's [Faker](https://rubygems.org/gems/faker).
Faker requires PHP >= 5.3.3.
[![Monthly Downloads](https://poser.pugx.org/fzaninotto/faker/d/monthly.png)](https://packagist.org/packages/fzaninotto/faker) [![Build Status](https://travis-ci.org/fzaninotto/Faker.svg?branch=master)](https://travis-ci.org/fzaninotto/Faker) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549/mini.png)](https://insight.sensiolabs.com/projects/eceb78a9-38d4-4ad5-8b6b-b52f323e3549)
# Table of Contents
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Formatters](#formatters)
- [Base](#fakerproviderbase)
- [Lorem Ipsum Text](#fakerproviderlorem)
- [Person](#fakerprovideren_usperson)
- [Address](#fakerprovideren_usaddress)
- [Phone Number](#fakerprovideren_usphonenumber)
- [Company](#fakerprovideren_uscompany)
- [Real Text](#fakerprovideren_ustext)
- [Date and Time](#fakerproviderdatetime)
- [Internet](#fakerproviderinternet)
- [User Agent](#fakerprovideruseragent)
- [Payment](#fakerproviderpayment)
- [Color](#fakerprovidercolor)
- [File](#fakerproviderfile)
- [Image](#fakerproviderimage)
- [Uuid](#fakerprovideruuid)
- [Barcode](#fakerproviderbarcode)
- [Miscellaneous](#fakerprovidermiscellaneous)
- [Biased](#fakerproviderbiased)
- [Html Lorem](#fakerproviderhtmllorem)
- [Modifiers](#modifiers)
- [Localization](#localization)
- [Populating Entities Using an ORM or an ODM](#populating-entities-using-an-orm-or-an-odm)
- [Seeding the Generator](#seeding-the-generator)
- [Faker Internals: Understanding Providers](#faker-internals-understanding-providers)
- [Real Life Usage](#real-life-usage)
- [Language specific formatters](#language-specific-formatters)
- [Third-Party Libraries Extending/Based On Faker](#third-party-libraries-extendingbased-on-faker)
- [License](#license)
## Installation
```sh
composer require fzaninotto/faker
```
## Basic Usage
### Autoloading
Faker supports both `PSR-0` as `PSR-4` autoloaders.
```php
<?php
# When installed via composer
require_once 'vendor/autoload.php';
```
You can also load `Fakers` shipped `PSR-0` autoloader
```php
<?php
# Load Fakers own autoloader
require_once '/path/to/Faker/src/autoload.php';
```
*alternatively, you can use any another PSR-4 compliant autoloader*
### Create fake data
Use `Faker\Factory::create()` to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want.
```php
<?php
// use the factory to create a Faker\Generator instance
$faker = Faker\Factory::create();
// generate data by accessing properties
echo $faker->name;
// 'Lucy Cechtelar';
echo $faker->address;
// "426 Jordy Lodge
// Cartwrightshire, SC 88120-6700"
echo $faker->text;
// Dolores sit sint laboriosam dolorem culpa et autem. Beatae nam sunt fugit
// et sit et mollitia sed.
// Fuga deserunt tempora facere magni omnis. Omnis quia temporibus laudantium
// sit minima sint.
```
Even if this example shows a property access, each call to `$faker->name` yields a different (random) result. This is because Faker uses `__get()` magic, and forwards `Faker\Generator->$property` calls to `Faker\Generator->format($property)`.
```php
<?php
for ($i = 0; $i < 10; $i++) {
echo $faker->name, "\n";
}
// Adaline Reichel
// Dr. Santa Prosacco DVM
// Noemy Vandervort V
// Lexi O'Conner
// Gracie Weber
// Roscoe Johns
// Emmett Lebsack
// Keegan Thiel
// Wellington Koelpin II
// Ms. Karley Kiehn V
```
**Tip**: For a quick generation of fake data, you can also use Faker as a command line tool thanks to [faker-cli](https://github.com/bit3/faker-cli).
## Formatters
Each of the generator properties (like `name`, `address`, and `lorem`) are called "formatters". A faker generator has many of them, packaged in "providers". Here is a list of the bundled formatters in the default locale.
### `Faker\Provider\Base`
randomDigit // 7
randomDigitNot(5) // 0, 1, 2, 3, 4, 6, 7, 8, or 9
randomDigitNotNull // 5
randomNumber($nbDigits = NULL, $strict = false) // 79907610
randomFloat($nbMaxDecimals = NULL, $min = 0, $max = NULL) // 48.8932
numberBetween($min = 1000, $max = 9000) // 8567
randomLetter // 'b'
// returns randomly ordered subsequence of a provided array
randomElements($array = array ('a','b','c'), $count = 1) // array('c')
randomElement($array = array ('a','b','c')) // 'b'
shuffle('hello, world') // 'rlo,h eoldlw'
shuffle(array(1, 2, 3)) // array(2, 1, 3)
numerify('Hello ###') // 'Hello 609'
lexify('Hello ???') // 'Hello wgt'
bothify('Hello ##??') // 'Hello 42jz'
asciify('Hello ***') // 'Hello R6+'
regexify('[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'); // sm0@y8k96a.ej
### `Faker\Provider\Lorem`
word // 'aut'
words($nb = 3, $asText = false) // array('porro', 'sed', 'magni')
sentence($nbWords = 6, $variableNbWords = true) // 'Sit vitae voluptas sint non voluptates.'
sentences($nb = 3, $asText = false) // array('Optio quos qui illo error.', 'Laborum vero a officia id corporis.', 'Saepe provident esse hic eligendi.')
paragraph($nbSentences = 3, $variableNbSentences = true) // 'Ut ab voluptas sed a nam. Sint autem inventore aut officia aut aut blanditiis. Ducimus eos odit amet et est ut eum.'
paragraphs($nb = 3, $asText = false) // array('Quidem ut sunt et quidem est accusamus aut. Fuga est placeat rerum ut. Enim ex eveniet facere sunt.', 'Aut nam et eum architecto fugit repellendus illo. Qui ex esse veritatis.', 'Possimus omnis aut incidunt sunt. Asperiores incidunt iure sequi cum culpa rem. Rerum exercitationem est rem.')
text($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto fugiat nemo. Consequatur recusandae qui cupiditate eos quod.'
### `Faker\Provider\en_US\Person`
title($gender = null|'male'|'female') // 'Ms.'
titleMale // 'Mr.'
titleFemale // 'Ms.'
suffix // 'Jr.'
name($gender = null|'male'|'female') // 'Dr. Zane Stroman'
firstName($gender = null|'male'|'female') // 'Maynard'
firstNameMale // 'Maynard'
firstNameFemale // 'Rachel'
lastName // 'Zulauf'
### `Faker\Provider\en_US\Address`
cityPrefix // 'Lake'
secondaryAddress // 'Suite 961'
state // 'NewMexico'
stateAbbr // 'OH'
citySuffix // 'borough'
streetSuffix // 'Keys'
buildingNumber // '484'
city // 'West Judge'
streetName // 'Keegan Trail'
streetAddress // '439 Karley Loaf Suite 897'
postcode // '17916'
address // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473'
country // 'Falkland Islands (Malvinas)'
latitude($min = -90, $max = 90) // 77.147489
longitude($min = -180, $max = 180) // 86.211205
### `Faker\Provider\en_US\PhoneNumber`
phoneNumber // '201-886-026
没有合适的资源?快使用搜索试试~ 我知道了~
赢涛智慧工单v1.8.3工单小程序
共2000个文件
php:5307个
js:3159个
css:1832个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 12 下载量 15 浏览量
2022-02-16
15:28:49
上传
评论
收藏 110.48MB ZIP 举报
温馨提示
首页DIY 支持DIY装修设计,现有组件:轮播图片、banner图片、公告组件、全部分类、自定义导航、自定义工单 员工端 员工端支持员工内部工单,支持代客户提交工单,可手机端派单处理,回复图文。员工可绑定微信登录,接受微信模板消息或短信通知。 表单自定义 在线diy编辑20多种自定义组件供选择,包括姓名、手机号、标题、描述、单行文本多行文本、下 拉、单选、开关、,上传图片、上传视频、 日期、时间、省市区、定位、位置、电子签名多级联动、代客提单等。 底部导航栏 底部导航栏支持自定义名称,跳转页面,文字未选择中颜色,文字已选中颜色、未选中图标,选中图标可设置是否显示。底部导航栏颜色自定义。 消息通知 支持微信模板消息通知、短信通知、飞蛾小票机打印(每个工单可以独立配置一个小票机)。 word模板插件 支持自定义上传任何docx格式模板,可替换文本类型,应用场景包括表格,窗口行业在线打印,协议,报名表格,派工单等支持在线预览,在线打印,预览时浏览器可导出pdf格式。 工单配置功能 支持复制,上架、下架、支持设置抄送员工组,支持设置转单派单员可改派,设置抄送、可设置快
资源推荐
资源详情
资源评论
收起资源包目录
赢涛智慧工单v1.8.3工单小程序 (2000个子文件)
app.835ef7d7.css 246KB
chunk-elementUI.ded27da0.css 228KB
chunk-acf39d70.4b4aaa9c.css 218KB
bootstrap.min.css 152KB
bootstrap.css 143KB
bootstrap.css 143KB
bootstrap.css 143KB
bootstrap.min.css 119KB
bootstrap.min.css 119KB
bootstrap.min.css 119KB
main.css 115KB
main.css 106KB
chunk-65d9d1a9.3fe333f7.css 105KB
chunk-5be9b0e0.96d16b68.css 105KB
chunk-3d96d07c.f8ca7690.css 105KB
chunk-459de1f2.4b8578ad.css 105KB
chunk-964ee0ac.15ccf1e7.css 105KB
chunk-4434ddfe.2a04c186.css 105KB
chunk-8582eb44.5b67e4ba.css 105KB
chunk-69b67cc7.fbc17a27.css 104KB
chunk-2b86aa11.2ec01e2e.css 104KB
chunk-f018d4de.caabdd9d.css 104KB
chunk-7c787848.bc440479.css 104KB
chunk-253edce9.f4b8c817.css 104KB
chunk-01bac560.d0462d10.css 104KB
chunk-3fb186d0.5315cbf8.css 104KB
chunk-6e5ce681.f7ab4d70.css 104KB
chunk-a775fe4a.c94fa185.css 104KB
chunk-26650c9d.2c734b1b.css 104KB
chunk-d2f2f6a6.b7e79413.css 104KB
chunk-7103a89b.8e0c101a.css 104KB
chunk-0de8458f.da50c9aa.css 104KB
chunk-2d474112.89d2d161.css 104KB
chunk-7949b7f8.107d4d37.css 104KB
chunk-a8fec9c6.f604cbbb.css 104KB
chunk-e7ba8c10.4d718fe0.css 104KB
chunk-5a10f5c2.8b319e30.css 104KB
chunk-ee5074bc.709f0595.css 104KB
chunk-5c476a09.71df4ae2.css 104KB
chunk-3acd3d11.80b89d64.css 104KB
chunk-197251de.c33f769d.css 104KB
chunk-086a1f74.e0ad89d3.css 104KB
chunk-14051c16.38d6d84b.css 104KB
chunk-18550136.ad5f3770.css 104KB
chunk-53e32cf2.77f1e068.css 104KB
chunk-33a489ab.ff4a184d.css 104KB
chunk-6025d5ed.87a2ad70.css 104KB
chunk-2d724684.5e40e667.css 104KB
chunk-14749964.f370e166.css 104KB
chunk-0faac146.f03acd38.css 104KB
chunk-095fc7e0.efcb58e8.css 104KB
chunk-3863a276.011106b5.css 104KB
chunk-67993fed.950f24c1.css 104KB
chunk-cfa60e58.6f8ba831.css 104KB
chunk-cae1d2c0.b9ad9bf7.css 97KB
chunk-1f78618b.51165648.css 97KB
chunk-10a3ea8c.e17bba14.css 97KB
chunk-5243998b.fd158f0f.css 97KB
chunk-7d98cf63.83f207a6.css 97KB
chunk-64f4fdac.c2b6cc2a.css 97KB
chunk-61e9fdb9.f1f540b3.css 96KB
mui.css 89KB
chunk-d5b44212.1e2a5021.css 88KB
chunk-5dcbd0dc.63fbf2d2.css 88KB
chunk-567d2a40.c838b37d.css 88KB
chunk-75ac46b8.1fc2a527.css 87KB
chunk-871b4076.842cd4ff.css 87KB
chunk-2425596b.9bf16817.css 87KB
chunk-00a9a50a.d2d0991a.css 87KB
chunk-8c623c0c.4e177de0.css 87KB
chunk-40280784.b9b22841.css 87KB
chunk-cfa7521c.ccf7da50.css 87KB
chunk-48a3bac0.87ce321d.css 87KB
chunk-02a96b53.2cf8e349.css 87KB
chunk-03a8bf57.4b1d4c63.css 87KB
chunk-c51041d2.1d28ad9d.css 87KB
chunk-a08125b8.73edfb6c.css 87KB
chunk-090f02bc.5c538191.css 87KB
chunk-1d6a6580.dddea239.css 87KB
chunk-70e47802.3245dc50.css 87KB
chunk-5bb3db6e.eea4abaf.css 87KB
chunk-9404c784.8e995f72.css 87KB
chunk-3e478548.3e1a7f9d.css 87KB
chunk-6b3adab3.34a236dd.css 87KB
chunk-5104f36a.185e007b.css 87KB
chunk-14d8543e.71a5d486.css 87KB
chunk-ebe6f6a4.65acf4df.css 87KB
chunk-21522e32.71169900.css 87KB
chunk-882729b0.e8a4c367.css 87KB
chunk-70a56528.e08f7197.css 87KB
chunk-484f7111.5fe9f04f.css 87KB
chunk-0a843b8c.0b84698d.css 86KB
chunk-d2e651e6.45622e76.css 86KB
chunk-ec0b7db6.40121f9a.css 86KB
chunk-d2a2377c.b0e79d5f.css 84KB
chunk-5ee629e4.f77c8016.css 84KB
chunk-5f2e1412.74f7940e.css 81KB
chunk-2c6455c6.f642c0b3.css 81KB
chunk-78c3339c.cc0cc3c5.css 81KB
chunk-b1b4ab46.c9a872c8.css 78KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
智慧浩海
- 粉丝: 1w+
- 资源: 5113
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页