devvime/kiichi-php-generator
Composer 安装命令:
composer require devvime/kiichi-php-generator
包简介
Simple Package PHP for generate controllers, models and middlewares.
README 文档
README
Simple Package PHP for generate controllers, models and middlewares.
Specifications and Dependencies
- PHP Version >= 8.2.0
install packages
Run the composer command for install this package.
composer require devvime/kiichi-php-generator --dev
Create folder structure
Create the following directories in the project root:
├── application
| ├── Controllers
| |── Models
| |── Middlewares
| |── Routes
| | └── server.php
Create Controller
To create a new controller with the assistant, just type the following command, informing the name of the controller and the name of the database table that will be used EX: php kiichi.phar new-controller controllerName tableName.
php kiichi.phar new-controller product products
├── application
| ├── Controllers
│ | └── ProductController.php
| |── Models
| | └── Products.php
To create the route group in the application/Routes/api.php file add --route /routeGroupName
php kiichi.phar new-controller product products --route /products
Result:
├── application
| ├── Controllers
│ | └── ProductController.php
| |── Models
| | └── Products.php
| |── Routes
| | └── server.php
Create Middleware
To create a new middleware with the wizard, just type the following command informing the name of the middleware.
php kiichi.phar new-middleware product
Result:
├── application
| ├── Middlewares
│ | └── ProductMiddleware.php
Create new email controller
Type the following command.
php kiichi.phar new-mail
Result:
├── application
| ├── Controllers
│ | └── EmailServiceController.php
Start the development server
Type the following command.
php kiichi.phar start
Result:
Development Server (http://localhost:8080) started
devvime/kiichi-php-generator 适用场景与选型建议
devvime/kiichi-php-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 71 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 03 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 devvime/kiichi-php-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 devvime/kiichi-php-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 71
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-07