durdev/adrgen
Composer 安装命令:
composer require durdev/adrgen
包简介
ADR pattern directories and files generator
README 文档
README
Installation | Usage | License
The simplest and best generator ADR classes and directories
Installation
Prerequisites
- PHP 7.3 or newer
- Composer
Getting Started
- Install as a global package
composer global require durdev/adrgen
- Make sure your global vendor binaries dir is in your $PATH
- Append the composer bin path to your bashrc (or zshrc or any *rc file)
echo 'PATH=$(composer global config bin-dir --absolute --quiet):$PATH' >> ~/.bashrc && source ~/.bashrc
Now that's all good to go.
Commands and usage
| Command | Description | Options | Arguments |
|---|---|---|---|
| adrgen make | Generates the basic CRUD operations files | --dir | model |
Details
- --dir: required your directory that will be the root folder for ADR actions directories
- model: required the model's name to be created
Example:
adrgen make user --dir=/var/www/project/actions
The default template created
/var/www/project/actions # Actions dir
├── (D) User # Capitalized model
│ ├── (D) Index # Action dir
| | ├── (F) IndexUserAction.php # Action file
| | └── (F) IndexUserResponder.php # Responder file
│ ├── (D) Create
| | ├── (F) CreateUserAction.php
| | └── (F) CreateUserResponder.php
│ ├── (D) Store
| | ├── (F) StoreUserAction.php
| | └── (F) StoreUserResponder.php
│ ├── (D) Edit
| | ├── (F) EditUserAction.php
| | └── (F) EditUserResponder.php
│ ├── (D) Update
| | ├── (F) UpdateUserAction.php
| | └── (F) UpdateUserResponder.php
│ ├── (D) Delete
| | ├── (F) DeleteUserAction.php
└── └── └── (F) DeleteUserResponder.php
License
MIT
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-01
