PHP教程

lumen添加artisan 命令方法

文 / 管理员 来源 / 转载 https://www.80shihua.com/archives/2574 阅读 / 273 2年前

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


评论

共0条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

站点声明:本站转载作品版权归原作者及来源网站所有,原创内容作品版权归作者所有,任何内容转载、商业用途等均须联系原作者并注明来源。

© 2020-2030 qdxcy.cn 版权所有京ICP备13045222号
相关侵权、举报、投诉及建议等,请发E-mail:2323946929@qq.com

友情链接: YzmCMS官方网站 YzmCMS官方论坛