Can someone confirm that this is intended behaviour?
In a model Text I have this relationship:
public function textI18Ns()
{
return $this->hasMany('\Models\TextI18N', 'textId');
}
I load all texts of an object with eager loading like this (note the lowercase of textI18Ns):
$general->texts()->with('textI18Ns')->rememberForever()->orderBy($orderby, $orderdirection)->get();
With the following code i have NO extra queries, like intended.
$texti18n = $text->textI18Ns;
But with the following code there are extra queries (It was a typo, but it doesn't throw an exeption?).
$texti18n = $text->TextI18Ns;
may be collection doesn't throw anything due to keep te code work without an error and keep in mind, invalid properties is NULL. #cmiiw
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community