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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -