public function getGate($throw = false)
{
if ($this->gate) {
return $this->gate;
}
if ($throw) {
throw new RuntimeException('The gate instance has not been set.');
}
return null;
}
/** * Get the gate instance. * * @return \Illuminate\Contracts\Auth\Access\Gate|null * @throws \RuntimeException * @static */ public static function getGate($throw = false) { return \Silber\Bouncer\Bouncer::getGate($throw); }