We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d932a26 + 3c808ad commit 0f435adCopy full SHA for 0f435ad
app/Http/Controllers/OrganisationController.php
@@ -68,7 +68,7 @@ public function getAll(Request $request)
68
{
69
try {
70
/** @var Collection $orgs */
71
- $orgs = $this->orgRepo->all();
+ $orgs = $this->orgRepo->all()->load('details');
72
} catch (\Exception $e) {
73
Log::error('Could not get Organisations list', ['message' => $e->getMessage()]);
74
@@ -79,10 +79,6 @@ public function getAll(Request $request)
79
], 500);
80
}
81
82
- $orgs->each(function (Organisation $org) {
83
- $org->load('details');
84
- });
85
-
86
$resource = new \League\Fractal\Resource\Collection($orgs, new OrganisationTransformer([
87
'unpublished' => $request->header('x-api-key') ? false : true,
88
]));
0 commit comments