Silber\Bouncer\Bouncer::is PHP Méthode

is() public méthode

Start a chain, to check if the given authority has a certain role.
public is ( Model $authority ) : ChecksRole
$authority Illuminate\Database\Eloquent\Model
Résultat Silber\Bouncer\Conductors\ChecksRole
    public function is(Model $authority)
    {
        return new ChecksRole($authority, $this->clipboard);
    }

Usage Example

 /**
  * Start a chain, to check if the given user has a certain role.
  *
  * @param \Illuminate\Database\Eloquent\Model $user
  * @return \Silber\Bouncer\Conductors\ChecksRole 
  * @static 
  */
 public static function is($user)
 {
     return \Silber\Bouncer\Bouncer::is($user);
 }