🌐 Add 'all-meetups' route and update sidebar to include global meetup view

- Introduced `all-meetups` route (`meetups.index-all`) for accessing meetups globally.
- Updated sidebar with a new navigation item for global meetups, including icon and dynamic badge count.
- Enhanced backend logic to handle country-specific and global meetup filtering based on the current route.
This commit is contained in:
HolgerHatGarKeineNode
2025-11-24 02:45:13 +01:00
parent ac720a0753
commit ae7479eac0
9 changed files with 44 additions and 13 deletions

View File

@@ -26,7 +26,21 @@
:current="request()->routeIs('meetups.index')"
wire:navigate
badge="{{ \App\Models\Meetup::query()->whereHas('city.country', fn($query) => $query->where('countries.code', request()->route('country')))->count() }}">
{{ __('Meetups') }}
<div class="flex items-center space-x-2">
<span>{{ __('Meetups') }}</span>
<img alt="{{ request()->route('country') }}"
src="{{ asset('vendor/blade-flags/country-'.request()->route('country').'.svg') }}"
width="24" height="12"/>
</div>
</flux:navlist.item>
<flux:navlist.item icon="user-group" :href="route_with_country('meetups.index-all')"
:current="request()->routeIs('meetups.index-all')"
wire:navigate
badge="{{ \App\Models\Meetup::query()->count() }}">
<div class="flex items-center space-x-2">
<span>{{ __('Alle Meetups') }}</span>
<flux:icon name="globe-europe-africa"/>
</div>
</flux:navlist.item>
<flux:navlist.item icon="map" :href="route_with_country('meetups.map')"
:current="request()->routeIs('meetups.map')"