mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
logo
This commit is contained in:
@@ -15,30 +15,37 @@ class LandingPage extends Component
|
|||||||
|
|
||||||
public ?int $year = null;
|
public ?int $year = null;
|
||||||
|
|
||||||
|
public function mount()
|
||||||
|
{
|
||||||
|
$this->meetup->load([
|
||||||
|
'media',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.meetup.landing-page', [
|
return view('livewire.meetup.landing-page', [
|
||||||
'events' => MeetupEvent::query()
|
'events' => MeetupEvent::query()
|
||||||
->with([
|
->with([
|
||||||
'meetup.city.country',
|
'meetup.city.country',
|
||||||
])
|
])
|
||||||
->where('meetup_events.meetup_id', $this->meetup->id)
|
->where('meetup_events.meetup_id', $this->meetup->id)
|
||||||
->where('meetup_events.start', '>=', now())
|
->where('meetup_events.start', '>=', now())
|
||||||
->get()
|
->get()
|
||||||
->map(fn($event) => [
|
->map(fn($event) => [
|
||||||
'id' => $event->id,
|
'id' => $event->id,
|
||||||
'startDate' => $event->start,
|
'startDate' => $event->start,
|
||||||
'endDate' => $event->start->addHours(1),
|
'endDate' => $event->start->addHours(1),
|
||||||
'location' => $event->location,
|
'location' => $event->location,
|
||||||
'description' => $event->description,
|
'description' => $event->description,
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
->layout('layouts.guest', [
|
->layout('layouts.guest', [
|
||||||
'SEOData' => new SEOData(
|
'SEOData' => new SEOData(
|
||||||
title: $this->meetup->name,
|
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!'),
|
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')),
|
image: asset($this->meetup->getFirstMediaUrl('logo')),
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Traits\TwitterTrait;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
@@ -66,6 +65,7 @@ class Meetup extends Model implements HasMedia
|
|||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('logo')
|
$this->addMediaCollection('logo')
|
||||||
|
->singleFile()
|
||||||
->useFallbackUrl(asset('img/einundzwanzig-cover-lesestunde.png'));
|
->useFallbackUrl(asset('img/einundzwanzig-cover-lesestunde.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user