mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
47 lines
1.7 KiB
PHP
47 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Livewire\Meetup;
|
|
|
|
use App\Models\Country;
|
|
use App\Models\Meetup;
|
|
use App\Models\MeetupEvent;
|
|
use Livewire\Component;
|
|
use RalphJSmit\Laravel\SEO\Support\SEOData;
|
|
|
|
class LandingPage extends Component
|
|
{
|
|
public Meetup $meetup;
|
|
public Country $country;
|
|
|
|
public ?int $year = null;
|
|
|
|
protected $queryString = ['year'];
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.meetup.landing-page', [
|
|
'events' => MeetupEvent::query()
|
|
->with([
|
|
'meetup.city.country',
|
|
])
|
|
->where('meetup_events.meetup_id', $this->meetup->id)
|
|
->where('meetup_events.start', '>=', now())
|
|
->get()
|
|
->map(fn($event) => [
|
|
'id' => $event->id,
|
|
'startDate' => $event->start,
|
|
'endDate' => $event->start->addHours(1),
|
|
'location' => $event->location,
|
|
'description' => $event->description,
|
|
]),
|
|
])
|
|
->layout('layouts.guest', [
|
|
'SEOData' => new SEOData(
|
|
title: $this->meetup->name,
|
|
description: __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!'),
|
|
image: asset($this->meetup->getFirstMediaUrl('logo')),
|
|
)
|
|
]);
|
|
}
|
|
}
|