Lumen make:command

前端 未结 3 793
遇见更好的自我
遇见更好的自我 2020-12-24 13:34

I\'m trying to execute code within my Lumen install via the command line. In full Laravel , I\'ve read that you can use commands to achieve this via \"make:command\", but Lu

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 14:09

    You can use the artisan CLI in Lumen as the same way as in Laravel but with fewer built-in commands. To see all built-in commands, use the php artisan command in Lumen.

    Although there is no make:command command at Lumen, you can create your custom command:

    • Add new command class inside the app/Console/Commands folder, you can use the sample class template of the framework serve command

    • Register your custom command by adding your created class to the $commands member inside the app/Console/Kernel.php file.

    Except the command generating, you can use the Laravel docs for commands when working with Lumen.

提交回复
热议问题