Skip to content

Commit

Permalink
fix: eager load partner media
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Jul 3, 2024
1 parent 566904e commit af3b0f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Livewire/Pages/Partners.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ protected function getInstitutions(): array
return Institution::query()
->where('enabled', true)
->orderBy('order')
->with('media')
->get()
->map(fn (Institution $institution) => [
'name' => $institution->name,
Expand All @@ -43,6 +44,7 @@ protected function getExperts(): array
return Expert::query()
->where('enabled', true)
->orderBy('order')
->with('media')
->get()
->map(fn (Expert $expert) => [
'name' => $expert->name,
Expand Down

0 comments on commit af3b0f8

Please sign in to comment.