qingbing/program-laravel-api

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

laravel 实现的程序员模块中的通用功能 api

1.0.1 2020-08-07 15:23 UTC

This package is auto-updated.

Last update: 2021-10-07 18:19:02 UTC


README

异常文件编号

  1. 110001 : \Program\Services\Login
  2. 110002 : \Program\Middleware\ProgramLogin

program-laravel-api

laravel 实现的程序员模块中的通用功能 api

使用方法

1. 路由管理

1.1 初始化 program 路由(routes/web.php)

# 添加所有路由
\Program\Assistant::initRoute();
# 添加指定模块路由
\Program\Assistant::initRoute(['login']);
# 添加自定义路由,一般为项目上新路由
\Program\Assistant::registerRoute(function(){
    Route::get('setting', ...);
});

2. 中间件管理

2.1 添加 program 登录中间件(\App\Http\Kernel::$routeMiddleware)

// program 登录中间件
'programLogin' => \Program\Middleware\ProgramLogin::class,