public function with_unguarded( $attribute, $callback ) {

		if ( static::$_unguarded ) {
			$callback( $this );

			return;
		}

		if ( is_array( $attribute ) ) {
			$attributes = $attribute;
		} else {
			$attributes = func_get_args();
			$callback   = array_pop( $attributes );
		}

		$_fillable = $this->_fillable;
		$_guarded  = $this->_guarded;

		if ( $this->_fillable ) {
			$this->_fillable = array_merge( $this->_fillable, $attributes );
		} else {
			$this->_guarded = array_diff( $this->_guarded, $attributes );
		}

		$callback( $this );

		$this->_fillable = $_fillable;
		$this->_guarded  = $_guarded;

	}
public function with_unguarded( $attribute, $callback ) {

		if ( static::$_unguarded ) {
			$callback( $this );

			return;
		}

		if ( is_array( $attribute ) ) {
			$attributes = $attribute;
		} else {
			$attributes = func_get_args();
			$callback   = array_pop( $attributes );
		}

		$_fillable = $this->_fillable;
		$_guarded  = $this->_guarded;

		if ( $this->_fillable ) {
			$this->_fillable = array_merge( $this->_fillable, $attributes );
		} else {
			$this->_guarded = array_diff( $this->_guarded, $attributes );
		}

		$callback( $this );

		$this->_fillable = $_fillable;
		$this->_guarded  = $_guarded;

	}
public function with_unguarded ( $ attribute , $ callback ) { if ( static :: $ _unguarded ) { $ callback ( $ this ) ; return ; } if ( is_array ( $ attribute ) ) { $ attributes = $ attribute ; } else { $ attributes = func_get_args ( ) ; $ callback = array_pop ( $ attributes ) ; } $ _fillable = $ this -> _fillable ; $ _guarded = $ this -> _guarded ; if ( $ this -> _fillable ) { $ this -> _fillable = array_merge ( $ this -> _fillable , $ attributes ) ; } else { $ this -> _guarded = array_diff ( $ this -> _guarded , $ attributes ) ; } $ callback ( $ this ) ; $ this -> _fillable = $ _fillable ; $ this -> _guarded = $ _guarded ; }
Make a function call with a given attribute unguarded.

@since 2.1.0

@param string   $attribute,...
@param callable $callback
Make a function call with a given attribute unguarded .