fokosun/artisan-chain-commands
Composer 安装命令:
composer require fokosun/artisan-chain-commands
包简介
Run multiple artisan commands all at once with a very short, simple and sweet syntax
README 文档
README
Chain Commands Artisan Command
This package helps to chain multiple artisan commands using a simple, easy to understand syntax.
Example
php artisan chain-commands "make:controller TestController,make:event TestEvent"
This will run the make:controller and make:event artisan commands consecutively and displays the output in a table.
How to install
Run the following artisan command in the root of your Laravel project.
composer require fokosun/artisan-chain-commands
Lastly, add Artisan Chain Commands to the list of providers in config/app under providers:
'providers' => ServiceProvider::defaultProviders()->merge([
...
\Fokosun\ArtisanChainCommands\Providers\ArtisanChainCommandsProvider::class,
...
])->toArray(),
How to use
You can chain multiple artisan commands with ease but there are a few commands that are not supported. See list below.
| Ignored Command | Description |
|---|---|
| chain-commands | Not allowed |
| db | This opens a REPL (Read, Evaluate, Print and Loop) environment.\nYou should not run this command with chain commands. |
| docs | This opens the Laravel documentation page in a browser window.\nYou should not run this command with chain commands. |
| docs 1 | This opens the Laravel documentation page in a browser window.\nYou should not run this command with chain commands. |
| docs 2 | This opens the Laravel documentation page in a browser window.\nYou should not run this command with chain commands. |
| docs -- search query | This opens the Laravel documentation page in a browser window.\nYou should not run this command with chain commands.. |
| help | Displays help for a command.\nYou should not run this command with chain commands.. |
| serve | Not allowed. |
| test | Not allowed. |
| tinker | This opens a REPL (Read, Evaluate, Print and Loop) environment.\nYou should not run this command with chain commands.. |
| vendor:publish | This is an interactive command.\nYou should not run this command with chain commands.. |
| schedule:work | Starts the schedule worker.\nYou should not run this command with chain commands. |
| queue:work | Starts processing jobs on the queue as a daemon.\nYou should not run this command with chain commands. |
| queue:restart | Restarts queue worker daemons after their current job.\nYou should not run this command with chain commands. |
| queue:listen | Listens to a given queue.\nYou should not run this command with chain commands. |
Artisan chain command will ignore these commands for the reasons outlined in the table above.
Shorthand commands
Artisan chain commands also ship with a few shorthand commands which are essentially a chain of commonly used commands to aid development. An example are the 'config:clear', 'cache:clear', 'view:clear' commands combination. These can be run with just one single shorthand command. See list below:
'clear:ccv' => ['config:clear', 'cache:clear', 'view:clear'],
'clear:*' => ['config:clear', 'cache:clear', 'view:clear','event:clear', 'optimize:clear', 'queue:clear'],
'db:rms' => ['migrate:refresh', 'migrate', 'db:seed'],
Contributing
This is opensource and contributions are highly welcome.
License
MIT
fokosun/artisan-chain-commands 适用场景与选型建议
fokosun/artisan-chain-commands 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 3, 最近一次更新时间为 2023 年 11 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 fokosun/artisan-chain-commands 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fokosun/artisan-chain-commands 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-13