承接 mehlah/li3_populator 相关项目开发

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

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

mehlah/li3_populator

Composer 安装命令:

composer require mehlah/li3_populator

包简介

Populate a database with mass insertion

README 文档

README

li3_populator library let you generate fake data for your Lithium models and save them in the database. It provides a Lithium's ORM/ODM adapter to Faker.

Usage Example

Here is an example showing how to populate 50 People data objects (instances of lithium\data\entity\Record or lithium\data\entity\Document), and save the records or documents in the database.

use faker\Factory;
use li3_populator\extensions\adapter\ORM\Lithium\Populator;

$generator = Factory::create();
$populator = new Populator($generator);
$populator->addEntity('People', 50);
$people_ids = $populator->execute();

The populator will guess the relevant data for each field based on your models schema definitions.

For a more advanced usage, take a look to Faker docs.

Installation

This library is installable via Composer as mehlah/li3_populator.

Don't forget to add the library to your application in config/bootstrap/libraries.php

Libraries::add('li3_populator');

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-12-30