Using L3 the following works fine :
$r = Site::with('services')->get()
That returns exactly what I'd expect. An array of Site
objects, with the services relationship all neatly populated.
However, if instead I only use the following:
$r = Site::with('services')->first()
or
$r = Site::with('services')->all()
The relationships for the site object are complete empty.
That feels like a bug to me, but is there something off in what I'm trying to do? At the moment to get the same effect as using first()
in place of get()
I'm having to pull the first element from the returned array.