src/BaseClipboard.php
public function checkRole(Model $authority, $roles, $boolean = 'or')
    {
        $count = $this->countMatchingRoles($authority, $roles);

        if ($boolean == 'or') {
            return $count > 0;
        } elseif ($boolean === 'not') {
            return $count === 0;
        }

        return $count == count((array) $roles);
    }
public function checkRole(Model $authority, $roles, $boolean = 'or')
    {
        $count = $this->countMatchingRoles($authority, $roles);

        if ($boolean == 'or') {
            return $count > 0;
        } elseif ($boolean === 'not') {
            return $count === 0;
        }

        return $count == count((array) $roles);
    }
public function checkRole ( Model $ authority , $ roles , $ boolean = 'or' ) { $ count = $ this -> countMatchingRoles ( $ authority , $ roles ) ; if ( $ boolean == 'or' ) { return $ count > 0 ; } elseif ( $ boolean === 'not' ) { return $ count === 0 ; } return $ count == count ( ( array ) $ roles ) ; }
Check if an authority has the given roles.

@param  \Illuminate\Database\Eloquent\Model  $authority
@param  array|string  $roles
@param  string  $boolean
@return bool
Check if an authority has the given roles .