rareloop/hatchet
最新稳定版本:v1.1.2
Composer 安装命令:
composer require rareloop/hatchet
包简介
README 文档
README
Installation
composer require rareloop/hatchet
Once installed you need to copy the hatchet file into your Lumberjack theme directory.
It is assuming you're using Lumberjack inside Bedrock. If not, you may need to make some changes to paths in the hatchet file
Basic Usage
You can now access the Hatchet CLI from inside your Lumberjack theme directory:
To show available commands
php hatchet list
To run a command
For a given command called test:command you would run the following:
php hatchet test:command
Get additional help about a command
For a given command called test:command you would run the following:
php hatchet help test:command
Adding Commands
To add additional commands to Hatchet add them to config/hatchet.php (create the file if it doesn't exist).
// config/hatchet.php return [ 'commands' => [ MyCommand::class, ], ];
Writing Commands
Create a subclass of Rareloop\Hatchet\Commands\Command:
namespace MyNamespace; use Rareloop\Hatchet\Commands\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class ControllerMake extends Command { protected $signature = 'test:command {paramName : The description of the parameter}'; protected $description = 'A description of the command'; protected function execute(InputInterface $input, OutputInterface $output) { // Command implementation } }
Hatchet uses the same $signature syntax as Laravel, see here for more information.
Hatchet Command is a subclass of Symfony's Command object, for more information on how to implement the execute() function see here.
统计信息
- 总下载量: 41.5k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2018-06-09