1. Go to this page and download the library: Download jmhc/laravel-console library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jmhc / laravel-console example snippets
php artisan vendor:publish --tag=jmhc-console
// 创建 Test 控制器位于 app/Http/Controllers/Test.php
php artisan jmhc-api:make-controller test
// 创建 Test 控制器修改继承父类
php artisan jmhc-api:make-controller test --controller-extends-custom App/BaseController
// 创建 Test 控制器并添加后缀,位于 app/Http/Controllers/TestController.php
php artisan jmhc-api:make-controller test -s
...
// 创建公用模型位于 app/Common/Models 并排除 test,foos 表
php artisan jmhc-api:make-model --dir Common/Models -t test -t foos
// 创建 Test 模型位于 app/Http/Models/Test.php
php artisan jmhc-api:make-model test
// 创建 Test 模型修改继承父类
php artisan jmhc-api:make-model test --model-extends-custom App\BaseModel
// 创建 Test 模型并添加后缀,位于 app/Http/Models/TestModel.php
php artisan jmhc-api:make-model test -s
...
// 创建 Test 服务位于 app/Http/Services/Test.php
php artisan jmhc-api:make-service test
// 创建 Test 服务修改继承父类
php artisan jmhc-api:make-service test --service-extends-custom App\BaseService
// 创建 Test 服务并添加后缀,位于 app/Http/Services/TestService.php
php artisan jmhc-api:make-service test -s
...
// 创建 Test 验证器位于 app/Http/Validates/Test.php
php artisan jmhc-api:make-validate test
// 创建 Test 验证器修改继承父类
php artisan jmhc-api:make-validate test --validate-extends-custom App/BaseValidate
// 创建 Test 验证器并添加后缀,位于 app/Http/Validates/TestValidate.php
php artisan jmhc-api:make-validate test -s
...