Skip to content

Commit af3b0f8

Browse files
committed
fix: eager load partner media
1 parent 566904e commit af3b0f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/Livewire/Pages/Partners.php

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ protected function getInstitutions(): array
2929
return Institution::query()
3030
->where('enabled', true)
3131
->orderBy('order')
32+
->with('media')
3233
->get()
3334
->map(fn (Institution $institution) => [
3435
'name' => $institution->name,
@@ -43,6 +44,7 @@ protected function getExperts(): array
4344
return Expert::query()
4445
->where('enabled', true)
4546
->orderBy('order')
47+
->with('media')
4648
->get()
4749
->map(fn (Expert $expert) => [
4850
'name' => $expert->name,

0 commit comments

Comments
 (0)