diff --git a/src/Entrust/Traits/EntrustUserTrait.php b/src/Entrust/Traits/EntrustUserTrait.php index c799bbeb..7d305c41 100644 --- a/src/Entrust/Traits/EntrustUserTrait.php +++ b/src/Entrust/Traits/EntrustUserTrait.php @@ -12,6 +12,7 @@ use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Config; use InvalidArgumentException; +use Illuminate\Support\Str; trait EntrustUserTrait { @@ -162,7 +163,7 @@ public function can($permission, $requireAll = false) foreach ($this->cachedRoles() as $role) { // Validate against the Permission table foreach ($role->cachedPermissions() as $perm) { - if (str_is( $permission, $perm->name) ) { + if (Str::is( $permission, $perm->name) ) { return true; } }