virchow / virlumen-installer
The Laravel Lumen Framework Modify by virchow.
Requires
- php: ^7.3|^8.0
- laravel/lumen-framework: ^8.0
Requires (Dev)
- fakerphp/faker: ^1.9.1
- mockery/mockery: ^1.3.1
- phpunit/phpunit: ^9.3
This package is not auto-updated.
Last update: 2024-11-14 03:33:17 UTC
README
只是将lumen的常用的扩展做成自定义安装的形式
目录
安装
- 通过composer创建项目(推荐)
composer create-project virchow/virlumen-installer your-project
- 通过 git clone 项目
git clone https://github.com/wei199469/virlumen-installer.git your-project
composer run-script pre-install-cmd
说明
Dingo-Api
Laravel 下知名扩展包 Dingo API 的中文文档 此扩展集成版本控制、用户认证、节点限流等常用功能,可作为统一风格的Api
JWT-Auth
Sentry-Laravel
Swagger
laravel-activity-log
revisionable
Vtiful\Kernel\Excel
项目配置
Dingo-Api
在
boostrap/app.php
中添加$app->register(Dingo\Api\Provider\LumenServiceProvider::class);
创建自己的api路由,如
$api = app('Dingo\Api\Routing\Router'); $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1\Auth'], function ($api) { $api->group(['prefix' => 'user'], function ($api) { $api->post('login', 'AuthController@login'); $api->group(['middleware' => 'auth'], function($api){ $api->post('logout', 'AuthController@logout'); $api->post('refresh', 'AuthController@refresh'); $api->post('me', 'AuthController@me'); }); }); });
Jwt-Auth
取消 ` $app->routeMiddleware([
'auth' => App\Http\Middleware\Authenticate::class
]);` 的注释;
取消
$app->register(App\Providers\AuthServiceProvider::class);
的注释;添加
$app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class);
;Oss
阿里云OSS 参考 阿里云官方文档
微软云Blob 参考 Azure Blob 存储
apidoc
Swagger 参考 Lumen 微服务生成 Swagger 文档
Dingo-api 参考 Dingo-Api 文档