I am trying to eager load a model in laravel but only return certain columns. I do not want the whole eager loaded table being presented.
public function car()
{
return $this->hasOne('Car', 'id')->get(['emailid','name']);
}
I am getting the following error:
log.ERROR: exception 'SymfonyComponentDebugExceptionFatalErrorException' with message 'Call to undefined method IlluminateDatabaseEloquentCollection::getAndResetWheres()'
See Question&Answers more detail:os