lumen添加artisan 命令方法

作者: dreamfly 分类: php 发布时间: 2020-07-17 10:52

laravel的artisan命令可以非常方便的为我们创建我们需要的脚手架,而在lumen中,这个功能是被删除掉的,如何把这个功能加上,我们需要下面的几个步骤。

安装composer 依赖Lumen Generator

composer require flipbox/lumen-generator

添加依赖配置

在bootstrap/app.php中

$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);

可以使用的命令

key:generate         Set the application key

make:channel         Create a new channel class
make:command         Create a new Artisan command
make:controller      Create a new controller class
make:event           Create a new event class
make:job             Create a new job class
make:listener        Create a new event listener class
make:mail            Create a new email class
make:middleware      Create a new middleware class
make:migration       Create a new migration file
make:model           Create a new Eloquent model class
make:notification    Create a new notification class
make:pipe            Create a new pipe class
make:policy          Create a new policy class
make:provider        Create a new service provider class
make:request         Create a new form request class
make:seeder          Create a new seeder class
make:test            Create a new test class

notifications:table  Create a migration for the notifications table

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

评论已关闭!