src/CachedClipboard.php
public function getAbilities(Model $authority, $allowed = true)
    {
        $key = $this->getCacheKey($authority, 'abilities', $allowed);

        if (is_array($abilities = $this->cache->get($key))) {
            return $this->deserializeAbilities($abilities);
        }

        $abilities = $this->getFreshAbilities($authority, $allowed);

        $this->cache->forever($key, $this->serializeAbilities($abilities));

        return $abilities;
    }
public function getAbilities(Model $authority, $allowed = true)
    {
        $key = $this->getCacheKey($authority, 'abilities', $allowed);

        if (is_array($abilities = $this->cache->get($key))) {
            return $this->deserializeAbilities($abilities);
        }

        $abilities = $this->getFreshAbilities($authority, $allowed);

        $this->cache->forever($key, $this->serializeAbilities($abilities));

        return $abilities;
    }
public function getAbilities ( Model $ authority , $ allowed = true ) { $ key = $ this -> getCacheKey ( $ authority , 'abilities' , $ allowed ) ; if ( is_array ( $ abilities = $ this -> cache -> get ( $ key ) ) ) { return $ this -> deserializeAbilities ( $ abilities ) ; } $ abilities = $ this -> getFreshAbilities ( $ authority , $ allowed ) ; $ this -> cache -> forever ( $ key , $ this -> serializeAbilities ( $ abilities ) ) ; return $ abilities ; }
Get the given authority's abilities.

@param  \Illuminate\Database\Eloquent\Model  $authority
@param  bool  $allowed
@return \Illuminate\Database\Eloquent\Collection
Get the given authority s abilities .