luminee / chariot
像工匠一样运行chariot,并支持项目和数据库连接
v0.0.2
2021-03-26 06:50 UTC
Requires
- php: >=7.1
README
安装
composer require luminee/chariot- 在
app.php中写入ChariotServiceProvider::class php artisan vendor:publish- 根据
.conn.conf.php.example创建.conn.conf.php - 在
config/chariot.php中修改配置
创建脚本文件
- 例如:你想要为
user模块中的project创建命令init:user - 在
app/Console/Commands/Project/User中创建文件InitUser.php(根据chariot.php中的script_namespace配置) - 文件看起来像
use Luminee\Chariot\Core\Command; class Init extends Command { protected $signature = 'init:user'; public function run(){ } }
运行脚本
- 你可以通过
php chariot project.user.init:user.dev --run来在开发连接上运行它