I have a Quote model:
class Quote extends Eloquent {
public function quote_lines() {
return $this->hasMany(\'QuoteLine\');
}
}
>
like @Virtlink and @TonyArra said this error is fixed if you use camelCase name in relation functions (this solution worked for me). For example I had
public function origin_city()
{
return $this->belongsTo('City', 'origin_city_id');
}
This was not working, then I changed it to
public function origincity()
{
return $this->belongsTo('City', 'origin_city_id');
}
and it didn't work. Only when I used camel case conventions did it work
public function originCity()
{
return $this->belongsTo('City', 'origin_city_id');
}
Hope it helps others