Illuminate\Database\Eloquent\Builder::without PHP Method

without() public method

Prevent the specified relations from being eager loaded.
public without ( mixed $relations )
$relations mixed
    public function without($relations)
    {
        if (is_string($relations)) {
            $relations = func_get_args();
        }
        $this->eagerLoad = array_diff_key($this->eagerLoad, array_flip($relations));
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Prevent the specified relations from being eager loaded.
  *
  * @param mixed $relations
  * @return $this 
  * @static 
  */
 public static function without($relations)
 {
     return \Illuminate\Database\Eloquent\Builder::without($relations);
 }