igorbrites/entity-generator
Composer 安装命令:
composer require igorbrites/entity-generator
包简介
Entity Generator for PHP based on database
README 文档
README
Generates entities based on database
To use it, install via composer:
composer global require igorbrites/entity-generator=dev-master
Edit the config.json with the options below:
namespace: The namespace of the entities. Default:null(e.g.:My\\Awesome\\Namespace);output-dir: (Required!) The output folder (e.g.:/home/ubuntu/entities);date-type: The date fields type. Default\DateTime(e.g.:\\Carbon\\Carbon);extends: The class that the entities extends. Defaultnull(e.g.:\\My\\Awesome\\Class);fk-pattern: The pattern that fit your FKs. Default([a-z_]+)_id(e.g.:id([a-z_]+));database: (Required!) The database connection parameters:schema: The database name. Defaultdatabase;host: The database host. Default127.0.0.1;user: The database user. Defaultroot;password: The database password. Default ``;
Then, run the command:
entity-generator
It will generate two folders on the specified output folder, classes and tests, with your entities.
统计信息
- 总下载量: 62
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-09