role->permissions->contains(Permission::firstWhere('name','=','logs_viewAny')) ? Response::allow() : Response::deny('you are not the chosen one'); } public function home_page() { return Auth::user()->role->permissions->contains(Permission::firstWhere('name','=','home_page')) ? Response::allow() : Response::deny('you are not the chosen one'); } public function statistics() { return Auth::user()->role->permissions->contains(Permission::firstWhere('name','=','statistics')) ? Response::allow() : Response::deny('you are not the chosen one'); } }