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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user