1. 命令行文件生成$ php artisan make:command ApiGenerator
2. 编写代码模板就像你看到的,我使用了 php 的 heredoc 方式,不太优雅。开始用的文件方式,但是不支持替换数组,就放弃了;有好
2020-06-08