forjix/console
最新稳定版本:0.1.0
Composer 安装命令:
composer require forjix/console
包简介
Forjix Framework CLI tools
README 文档
README
CLI tools and command framework for the Forjix framework.
Installation
composer require forjix/console
Built-in Commands
serve- Start the PHP development servermake:controller- Generate a new controller classmake:model- Generate a new model classmake:migration- Generate a new database migrationmake:middleware- Generate a new middleware classmigrate- Run pending database migrationsmigrate:rollback- Rollback the last migration batchroutes:list- Display all registered routescache:clear- Clear the application cache
Creating Custom Commands
use Forjix\Console\Command; use Forjix\Console\Input; use Forjix\Console\Output; class GreetCommand extends Command { protected string $name = 'greet'; protected string $description = 'Greet a user'; public function handle(Input $input, Output $output): int { $name = $input->argument('name', 'World'); $output->line("Hello, {$name}!"); return 0; } }
Usage
use Forjix\Console\Application; $app = new Application('MyApp', '1.0.0'); $app->add(new GreetCommand()); $app->run();
License
GPL-3.0
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-01-05