Skip to content

v1.0.12

Compare
Choose a tag to compare
@walkor walkor released this 24 Dec 07:37
· 371 commits to master since this release

Support route middleware. For example.
config/route.php

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,
]);