authentication - Using rydurham Sentinel on specific route in Laravel 5.1 -
i using sentinel ryan durham https://github.com/rydurham/sentinel laravel 5.1.
i used use confide https://github.com/zizaco/confide larvel 4.2.
with confide able add auth route this
// applies auth filter routes within orders/ route::when('orders/*', 'auth');
i've searched through sentinel documentation feature cannot find out how done. can put auth admin
or user
in construct of controller, need have specific auth abilities on specific routes.
my question is, how can redirect user
goes route admin
using rydurham sentinel in clean fashion same confide?
you should use sentinel middlewares on routes.
route::get('orders', ['middleware' => 'sentry.admin', function () { // return view; }]);
Comments
Post a Comment