/** * Set the model instance being queried. * * @param \Magister\Services\Database\Elegant\Model $model * * @return $this */ public function setModel(Model $model) { $this->model = $model; $this->query->from($model->getUrl()); return $this; }