I'm trying to use the Laravel Gate Authorization system in my application, but the defines method does not appear to do anything. I've tried placing debug messages within the callback, but it doesn't seem to even be called. Am I doing something wrong? This is the code I'm using:
public function boot()
{
$this->registerPolicies();
foreach($this->getPermissions() as $permission){
Gate::define($permission->slug, function($user){
return $user->hasRole($permission->role);
});
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kzj9rR
via IFTTT
Aucun commentaire:
Enregistrer un commentaire