Illuminate\Database\Eloquent\Model::isUnguarded PHP Method

isUnguarded() public static method

Determine if current state is "unguarded".
public static isUnguarded ( ) : boolean
return boolean
    public static function isUnguarded()
    {
        return static::$unguarded;
    }

Usage Example

Example #1
0
 public function testUnguardedCallDoesNotChangeUnguardedStateOnException()
 {
     try {
         Model::unguarded(function () {
             throw new Exception();
         });
     } catch (Exception $e) {
         // ignore the exception
     }
     $this->assertFalse(Model::isUnguarded());
 }
Model