Silber\Bouncer\Database\Queries\Abilities::getForAuthority PHP Method

getForAuthority() public method

Get a list of the authority's abilities.
public getForAuthority ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
return Illuminate\Database\Eloquent\Collection
    public function getForAuthority(Model $authority, $allowed = true)
    {
        return Models::ability()->whereExists($this->getRoleConstraint($authority, $allowed))->orWhereExists($this->getAuthorityConstraint($authority, $allowed))->get();
    }