Is it possible to eager load an array of key => values using eloquent's with() or load() functions instead of a collection of Model objects? I only need a couple values from the relations, and don't need any object functionality, so I really don't need the memory overhead of having
"relations" => [
"relationship" => Collection()
"items" => [
0 => Model()
"attributes" => ...
"table" => ...
"guarded" => ...
...etc
1 => Model(),
...etc
if I could have something more like
"relations" => [
"relationship" => [
"items" => [
0 => [key => val, key => val ...],
1 => [key => val, key => val ...],
...etc
Is this possible? Or even use a basic php object instead of an Eloquent Model which contains an insane amount of overhead for just needing a few values? I have looked through the API, and stepped through a call stack while building the query builder object, and I don't see any obvious means of doing this, but I'm curious if any one knows a workaround.
Thanks!
-Eric