mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
add visible_on_map field to meetups table
This commit is contained in:
@@ -14,7 +14,7 @@ class WorldMap extends Component
|
||||
public function filterByMarker($id)
|
||||
{
|
||||
$meetup = Meetup::with(['city.country'])
|
||||
->find($id);
|
||||
->find($id);
|
||||
|
||||
return to_route('meetup.landing', [
|
||||
'country' => $meetup->city->country->code,
|
||||
@@ -26,15 +26,16 @@ class WorldMap extends Component
|
||||
{
|
||||
return view('livewire.meetup.world-map', [
|
||||
'allMarkers' => Meetup::query()
|
||||
->with([
|
||||
'city.country',
|
||||
])
|
||||
->get()
|
||||
->map(fn ($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
'coords' => [$meetup->city->latitude, $meetup->city->longitude],
|
||||
]),
|
||||
->where('visible_on_map', true)
|
||||
->with([
|
||||
'city.country',
|
||||
])
|
||||
->get()
|
||||
->map(fn($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
'coords' => [$meetup->city->latitude, $meetup->city->longitude],
|
||||
]),
|
||||
])->layout('layouts.app', [
|
||||
'SEOData' => new SEOData(
|
||||
title: __('World map of meetups'),
|
||||
|
||||
Reference in New Issue
Block a user