路由文件方式定义 ¶
在 /addons/comA/moduleA/route/
里面定义路由注册文件
例如
/addons/comA/moduleA/route/business.php
php
Route::group('moduleA/business', function () {
Route::get('xxx/<id>', '\addons\moduleA\controller\business\Xxx@getById');
Route::get('xxx', '\addons\moduleA\controller\business\Xxx@getData');
Route::post('xxx/<id>', '\addons\moduleA\controller\business\Xxx@postById');
Route::post('xxx', '\addons\moduleA\controller\business\Xxx@postData');
Route::put('xxx/<id>', '\addons\moduleA\controller\business\Xxx@putById');
Route::patch('xxx/<id>', '\addons\moduleA\controller\business\Xxx@patchById');
Route::delete('xxx/<id>', '\addons\moduleA\controller\business\Xxx@deleteById');
})->middleware([
\shiyun\middleware\SyAuthAppMiddle::class,
\shiyun\middleware\SyAuthTokenMiddle::class,
\shiyun\middleware\role\BizsMiddle::class,
\shiyun\middleware\CheckRestMiddle::class,
\shiyun\middleware\CheckFormMiddle::class,
\shiyun\middleware\CheckModelMiddle::class,
]);