我试图在laravel中加载一个模型,但只返回某些列.我不想看到整张桌子.
public function car()
{
return $this->hasOne('Car', 'id')->get(['emailid','name']);
}
我得到以下错误:
log.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Illuminate\Database\Eloquent\Collection::getAndResetWheres()'