src/Defender/Traits/HasDefender.php
public function hasPermissions(array $permissions, $strict = true, $force = false)
    {
        $allPermissions = $this->getAllPermissions($force)->pluck('name')->toArray();
        $equalPermissions = array_intersect($permissions, $allPermissions);
        $countEqual = count($equalPermissions);
        if ($countEqual > 0 && ($strict === false || $countEqual === count($permissions))) {
            return true;
        }

        return false;
    }
public function hasPermissions(array $permissions, $strict = true, $force = false)
    {
        $allPermissions = $this->getAllPermissions($force)->pluck('name')->toArray();
        $equalPermissions = array_intersect($permissions, $allPermissions);
        $countEqual = count($equalPermissions);
        if ($countEqual > 0 && ($strict === false || $countEqual === count($permissions))) {
            return true;
        }

        return false;
    }
public function hasPermissions ( array $ permissions , $ strict = true , $ force = false ) { $ allPermissions = $ this -> getAllPermissions ( $ force ) -> pluck ( 'name' ) -> toArray ( ) ; $ equalPermissions = array_intersect ( $ permissions , $ allPermissions ) ; $ countEqual = count ( $ equalPermissions ) ; if ( $ countEqual > 0 && ( $ strict === false || $ countEqual === count ( $ permissions ) ) ) { return true ; } return false ; }
Returns if the current user has all or one permission of the given array.
User permissions override role permissions.

@param array $permissions Array of permissions
@param bool $strict       Check if has all permissions from array or one of them
@param bool $force
@return bool
Returns if the current user has all or one permission of the given array . User permissions override role permissions .