mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
clickable markers
This commit is contained in:
@@ -10,6 +10,18 @@ class MeetupTable extends Component
|
||||
{
|
||||
public Country $country;
|
||||
|
||||
public function filterByMarker($id)
|
||||
{
|
||||
return to_route('meetup.table.meetup', [
|
||||
'country' => $this->country->code,
|
||||
'table' => [
|
||||
'filters' => [
|
||||
'byid' => $id,
|
||||
],
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
// let markers = [{name: 'VAK', coords: [50.0091294, 9.0371812], status: 'closed', offsets: [0, 2]}];
|
||||
@@ -23,6 +35,7 @@ class MeetupTable extends Component
|
||||
fn($query) => $query->where('countries.code', $this->country->code))
|
||||
->get()
|
||||
->map(fn($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
'coords' => [$meetup->city->latitude, $meetup->city->longitude],
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user