/** * Create a new newQuery instance with eager loaded relationships. * * @return newQuery */ protected function newQuery() { $query = $this->model->newQuery(); foreach ($this->withRelationships as $relationship) { $query->with($relationship); } return $query; }
/** * Add default clauses to the fetched user. */ public function newQuery() { return parent::newQuery()->with('profile'); }