Laravel 自定命令以及生成文件的例子
以创建service层为例子 1、执行命令 php artisan make:command ServiceMakeCommand 2、在app\Console\Commands 下就会多出一个 ServiceMakeCommand.php 文件 ,更改其内容为一下内容 ( 注意: 1、承了GeneratorCommand类, 2、protected $signature = ‘make:service {name}’; 中{name}必须要有 <?php namespace App\Console\Commands; use Illuminate\Console\Generator
下载地址
用户评论