Laravel 重度使用者,如何給 Lumen 新增便捷的命令操作

vinhson發表於2020-07-06

昨天無意間開啟了lumen於是乎安裝並使用,作為laravel重度使用者習慣性的使用php artisan make:命令列建立各種檔案,發現沒有該命令,於是今天它來了。
Lumen Generator

Installation:

composer require james.xue/lumen-generator --dev

Inside your bootstrap/app.php file, add:

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

Commands:

command description
php artisan env Display the current framework environment
php artisan make:command name Create a new command file
php artisan make:controller name Create a new controller file
php artisan make:event name Create a new event file
php artisan make:exception name || php artisan make:exception name -r Create a new custom exception class
php artisan make:factory Create a new model factory
php artisan make:jon name Create a new jon file
php artisan make:listener name || php artisan make:listener name -event EventName Create a new listener file
php artisan make:middleware name Create a new middleware file
php artisan make:model name Create a new model file
php artisan make:observer name || php artisan make:observer name -model ModelName Create a new observer file
php artisan make:provider Create a new service provider class
php artisan make:request name Create a new request file
php artisan make:rule name Create a new validation rule
php artisan event:generate Generate the missing events and listeners based on registration
php artisan key:generate Set the application key
php artisan storage:link Create a symbolic link from "public/storage" to "storage/app/public
本作品採用《CC 協議》,轉載必須註明作者和本文連結

不要輕易放棄。學習成長的路上,我們長路漫漫,只因學無止境

Don't give up easily. On the way of learning and growing up, we have a long way to go, just because there is no end to learning.

相關文章