Silber\Bouncer\Bouncer::allow PHP Method

allow() public method

Start a chain, to allow the given authority an ability.
public allow ( Model | string $authority ) : GivesAbility
$authority Illuminate\Database\Eloquent\Model | string
return Silber\Bouncer\Conductors\GivesAbility
    public function allow($authority)
    {
        return new GivesAbility($authority);
    }

Usage Example

Example #1
0
 /**
  * Start a chain, to allow the given role a ability.
  *
  * @param \Silber\Bouncer\Database\Role|string $role
  * @return \Silber\Bouncer\Conductors\GivesAbility 
  * @static 
  */
 public static function allow($role)
 {
     return \Silber\Bouncer\Bouncer::allow($role);
 }