public function setModel(Model $model)
    {
        $this->model = $model;

        $this->query->from($model->getTable());

        return $this;
    }
public function setModel(Model $model)
    {
        $this->model = $model;

        $this->query->from($model->getTable());

        return $this;
    }
public function setModel ( Model $ model ) { $ this -> model = $ model ; $ this -> query -> from ( $ model -> getTable ( ) ) ; return $ this ; }
Set a model instance for the model being queried.

@param  \Illuminate\Database\Eloquent\Model  $model
@return $this
Set a model instance for the model being queried .