假设我有2条路线:
Route::get('/viewfile', 'FileController@view');
// second route has 2 middlewares which could be anything else (dynamic)
Route::get('/upload', [
'middleware' => ['auth', 'upload'],
'uses' => 'FileController@upload'
]);
现在,当用户(或访问者)访问/viewfile
时,需要检查它是否也能够通过分配到/upload
路由的所有中间件。
换句话说,如何检查/upload
路线是否也可以访问?