Laravel 5 - Pass More Perminssion in controller -


i installed laravel 5 alexpechkarev package. created permission,role , users. gave permission allowed method $permissions = ['role'=>['admin', 'staff'] ]; admin have access can't access page staff user.. how can in advance

this controller code..

public function __construct()  {   $permissions = ['role'=>['admin', 'staff'] ];  if( is_object(request::route()) )  { request::route()->setparameter('larbac', $permissions);  $this->middleware('larbac');  } }  

here admin can access things view, edit, delete staff can't view, edit, delete page


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -