🌍 Scope lecturers and courses by country across views and enhance sidebar with dynamic country flags

This commit is contained in:
HolgerHatGarKeineNode
2025-12-05 19:04:38 +01:00
parent 4b16efaf9c
commit c9971144da
4 changed files with 25 additions and 5 deletions

View File

@@ -18,6 +18,9 @@ class extends Component {
public function mount(): void
{
$this->country = request()->route('country', config('app.domain_country'));
$this->course->load([
'courseEvents.registrations',
]);
}
public function with(): array
@@ -26,7 +29,10 @@ class extends Component {
'course' => $this->course->load('lecturer'),
'events' => $this->course
->courseEvents()
->with(['venue.city'])
->with([
'venue.city',
'registrations',
])
->where('from', '>=', now())
->orderBy('from', 'asc')
->get(),