forjix/console 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 server
  • make:controller - Generate a new controller class
  • make:model - Generate a new model class
  • make:migration - Generate a new database migration
  • make:middleware - Generate a new middleware class
  • migrate - Run pending database migrations
  • migrate:rollback - Rollback the last migration batch
  • routes:list - Display all registered routes
  • cache: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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-01-05