Closed lkorll closed 3 years ago
已经增加路由中间键,请更新webman-framework到1.0.12或者后续更高版本。
composer require workerman/webman-framework ^1.0.12
用法
Route::any('/admin', 'app\admin\controller\Index@index')->middleware([
support\middleware\MiddlewareA::class,
support\middleware\MiddlewareB::class,
]);
Route::group('/blog', function () {
Route::any('/create', function () {return response('create');});
Route::any('/edit', function () {return response('edit');});
Route::any('/view/{id}', function ($r, $id) {response("view $id");});
})->middleware([
support\middleware\MiddlewareA::class,
support\middleware\MiddlewareB::class,
]);
已经增加路由中间键,请更新webman框架到1.0.12或者后续更高版本。
composer require workerman/webman-framework ^1.0.12
用法路由::任何('/ admin','app \ admin \ controller \ Index @ index')->中间件([ support \ middleware \ MiddlewareA :: class, support \ middleware \ MiddlewareB :: class, ]); Route ::组('/ blog',function(){ Route ::任何('/ create',function(){返回 响应('create');}); Route :: any('/ edit',function(){ return response('edit');}); Route :: any('/ view / {id}',function($ r,$ id){响应(“ view $ id”);}); })->中间件([ support \ middleware \ MiddlewareA :: class, support \ middleware \ MiddlewareB :: class, ]);
已经增加路由中间键,请更新webman框架到1.0.12或者后续更高版本。
composer require workerman/webman-framework ^1.0.12
用法路由::任何('/ admin','app \ admin \ controller \ Index @ index')->中间件([ support \ middleware \ MiddlewareA :: class, support \ middleware \ MiddlewareB :: class, ]); Route ::组('/ blog',function(){ Route ::任何('/ create',function(){返回 响应('create');}); Route :: any('/ edit',function(){ return response('edit');}); Route :: any('/ view / {id}',function($ r,$ id){响应(“ view $ id”);}); })->中间件([ support \ middleware \ MiddlewareA :: class, support \ middleware \ MiddlewareB :: class, ]);
大佬好快.......点个赞
会考虑。