bluzphp/bluzman
Composer 安装命令:
composer require bluzphp/bluzman
包简介
Bluzman - Simple workflow manager for Bluz Skeleton
README 文档
README
Bluzman is a set of command-line tools which provides a simple workflow with an application based and maintained by Bluz framework.
Achievements
Features
- Code-generator of the application components
- Shorthand for phinx and composer tools
- Shorthand for built-in web-server
Requirements
- OS: Linux
- PHP: 7.3 (or later)
Usage
List of available commands
php ./vendor/bin/bluzman list
Code generators
All generators don't rewrite exists files, but you can run generate command with flag --force, to rewrite all of them
Model generator
For create new model you should run the following command in the terminal:
bluzman generate:model model_name table_name
- model_name - the name of model. With this name will be created folder of model.
- table_name - the name of databases table for pattern formation properties object model.
Module generator
For create new module you should run the following command in the terminal:
bluzman generate:module module_name [controller_name]...
- module_name - the name of module. With this name will be created folder of module.
- controller_name - the name(s) of controller(s). With this name will be created controller and view. Optional.
Controller generator
For create new controller you should run the following command in the terminal:
bluzman generate:controller module_name controller_name
- module_name - the name of module. With this name will be created folder of module.
- controller_name - the name of controller. With this name will be created controller and view.
CRUD generator
For create CRUD class you should run the following command in the terminal:
bluzman generate:crud model_name
Generator will create a class in model_name/Crud.php
If you want to generate CRUD controller and view you should run the next command:
bluzman generate:crud model_name module_name
Generator will create a controller in module_name/controllers/crud.php and a view module_name/views/crud.php
REST generator
For create REST controller you should run the following command in the terminal:
bluzman generate:rest model_name module_name
Generator will create a controller in module_name/controllers/rest.php.
GRID generator
For create GRID class you should run the following command in the terminal:
bluzman generate:grid model_name
Generator will create a class in model_name/Grid.php
If you want to generate GRID controller and view you should run the following command in the terminal:
bluzman generate:grid model_name module_name
Generator will create a controller in module_name/controllers/grid.php and a view module_name/views/grid.php
All-in-one generator - scaffold
Generator scaffold will generate:
For generate all of them run the following command in the terminal:
bluzman generate:scaffold model_name table_name module_name
Migrations
All
db:commandcommands is just shorthand to callphp /vendor/bin/phinx command -e default -c phinx.php
Status
bluzman db:status
Create migration
bluzman db:create UsersTable
Migrate
bluzman db:migrate
Rollback last migration
bluzman db:rollback
Create seed
bluzman db:seed:create UserSeed
Apply seed data
# all seed bluzman db:seed:run # specified seed bluzman db:seed:run UserSeed
Install and remove modules
Information about available modules will retrieve from https://github.com/bluzphp by
bluz-moduletag
Retrieve available modules:
bluzman module:list
Install module:
bluzman module:install auth
Remove module:
bluzman module:remove auth
Tests
For run all tests:
bluzman test
For run specified group:
bluzman test module-options
Server
Bluzman provides a commands list to operate with built-in PHP server.
To launch built-in PHP server you should run the following command in the terminal:
bluzman server:start --host[="..."] --port[="..."]
By default server will be available by the address 0.0.0.0:8000 and you will see all logs in the terminal.
But there is an option to run server in the background, this requires an option -b:
bluzman server:start ... -b
And if server launched in the background, it can be stopped with following command:
bluzman server:stop --host[="..."] --port[="..."]
If you want to know the status of the server you should run the command in the terminal:
bluzman server:status --host[="..."] --port[="..."]
bluzphp/bluzman 适用场景与选型建议
bluzphp/bluzman 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.94k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 04 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bluzphp/bluzman 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bluzphp/bluzman 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-20