承接 omatech/auto-faker 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

omatech/auto-faker

Composer 安装命令:

composer require omatech/auto-faker

包简介

Generate large amounts of multidimensional arrays without effort

README 文档

README

composer require omatech/auto-faker
php artisan vendor:publish

Usage

For each page you have to create a markup:

1- Define your data

in the folder config/autofaker create a file describing your data in YAML, see the index.yaml for example.

user:
  vehicles*:
    revisions*:
news*:
menu:
  groups*:
    links*:
pages+:

The * defines multiple records (the system generates between 3 and 6 randomly)

The + defines multiple laravel pagination records (the system generates between 3 and 6 randomly)

To see the generated sample data use this URL:

/index.html?debug-data=true

If you need an url called users.html then create a file users.html

2- Define your view

You must create a file called resources/views/markup/xxx.blade.php where xxx is the url you are using. See index.blade.php as an example.

3- Create the components needed for your project

4- If you want to modify the default fake data for each record modify the file config/autofaker/fake_record_format.json

}
    "status": {
        "type": "randomElement",
        "params": [
            [
                "active",
                "pending",
                "rejected"
            ]
        ]
    }
}

5- You're DONE!

If you need to add additional fields to each object generated modify the function getFakeRecord in the web.php file.

Test

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/AutoFakerTest

统计信息

  • 总下载量: 233
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固