Skip to content

Commit

Permalink
Merge pull request #235 from deveres/5.0
Browse files Browse the repository at this point in the history
Do not use Helper::hidrateModel, data from cache can be used
  • Loading branch information
santigarcor committed Dec 19, 2017
2 parents 85a3078 + 4c03490 commit 5f3e3d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Traits/LaratrustRoleTrait.php
Expand Up @@ -136,9 +136,7 @@ public function hasPermission($permission, $requireAll = false)
}

foreach ($this->cachedPermissions() as $perm) {
$perm = Helper::hidrateModel(Config::get('laratrust.models.permission'), $perm);

if (str_is($permission, $perm->name)) {
if (str_is($permission, $perm['name'])) {
return true;
}
}
Expand Down

0 comments on commit 5f3e3d0

Please sign in to comment.