Laravel roles on routes -
i have laravel 5.2 application using auth functionality provided laravel. roles , permissions i'm using laravel-permission. have defined 3 roles: admin, seller, buyer.
i looking solution able specify role per route. have group of routes accessible user role 'admin', group of routes accessible user role 'seller' , group of routes accessible users role 'buyer'.
i thinking define separate middleware admin, buyer , seller , use routes. or better way define 1 middleware 'roles' differentiates between roles? better ways?
you can make middleware takes parameters. can like
'middleware' => 'role:role_name',
a single middleware params passed should fine