dimanche 23 octobre 2016

Manually check if Laravel middleware is passed

Assume I have 2 routes:

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

Now when a user (or a visitor) visits /viewfile, need to check if it is also able to pass all the middlewares assigned to /upload route.

In another words, how to check if /upload route is also accessible?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ekYMk6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire