1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 23:47:32 +02:00

Eager loading extender (#2724)

* Eager loading extender
* Add tests for the eager loading extender
This commit is contained in:
Sami Mazouz
2021-03-25 15:36:39 +01:00
committed by GitHub
parent d642fb531c
commit 1c4817a0b3
8 changed files with 255 additions and 7 deletions

View File

@@ -28,6 +28,10 @@ class ListGroupsController extends AbstractListController
{
$actor = $request->getAttribute('actor');
return Group::whereVisibleTo($actor)->get();
$results = Group::whereVisibleTo($actor)->get();
$this->loadRelations($results, []);
return $results;
}
}