virchow / virlumen-installer by virchow

The Laravel Lumen Framework Modify by virchow.
10
0
0
Package Data
Maintainer Username: virchow
Package Create Date: 2020-12-01
Package Last Update: 2021-07-28
License: MIT
Last Refreshed: 2024-11-17 03:07:02
Package Statistics
Total Downloads: 10
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 0
Total Forks: 0
Total Open Issues: 0

virlumen-installer

** 只是将lumen的常用的扩展做成自定义安装的形式 **

目录

  1. 安装
  2. 说明
  3. 配置

安装

  1. 通过composer创建项目(推荐)

composer create-project virchow/virlumen-installer your-project

  1. 通过 git clone 项目

git clone https://github.com/wei199469/virlumen-installer.git your-project

composer run-script pre-install-cmd

说明

  1. Dingo-Api

    Laravel 下知名扩展包 Dingo API 的中文文档 此扩展集成版本控制、用户认证、节点限流等常用功能,可作为统一风格的Api

  2. JWT-Auth

    JSON Web Token Authentication for Laravel & Lumen

  3. Sentry-Laravel

    开源的实时错误报告工具

配置

  • 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); ; [安装]: #安装 "安装跳转" [configure]: #configure "配置"