mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
copy embed code
This commit is contained in:
@@ -11,6 +11,14 @@ class MeetupTable extends Component
|
||||
{
|
||||
public Country $country;
|
||||
|
||||
public string $mapEmbedCode = '';
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->mapEmbedCode = '<iframe src="'.url()->route('meetup.embed.countryMap',
|
||||
['country' => $this->country->code]).'" width="100%" height="500" frameborder="0" style="border:0;" allowfullscreen="" aria-hidden="false" tabindex="0"></iframe>';
|
||||
}
|
||||
|
||||
public function filterByMarker($id)
|
||||
{
|
||||
$meetup = Meetup::with(['city.country'])
|
||||
@@ -18,7 +26,7 @@ class MeetupTable extends Component
|
||||
|
||||
return to_route('meetup.landing', [
|
||||
'country' => $meetup->city->country->code,
|
||||
'meetup' => $meetup,
|
||||
'meetup' => $meetup,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -32,11 +40,11 @@ class MeetupTable extends Component
|
||||
'city.country',
|
||||
])
|
||||
->whereHas('city.country',
|
||||
fn ($query) => $query->where('countries.code', $this->country->code))
|
||||
fn($query) => $query->where('countries.code', $this->country->code))
|
||||
->get()
|
||||
->map(fn ($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
->map(fn($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
'coords' => [$meetup->city->latitude, $meetup->city->longitude],
|
||||
]),
|
||||
])->layout('layouts.app', [
|
||||
|
||||
Reference in New Issue
Block a user