mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
fixes #16
This commit is contained in:
@@ -53,7 +53,19 @@ class Meetups extends Component
|
||||
$this->myMeetupNames = auth()
|
||||
->user()
|
||||
->meetups()
|
||||
->pluck('meetups.name', 'meetups.id')
|
||||
->with([
|
||||
'city.country'
|
||||
])
|
||||
->select('meetups.id', 'meetups.city_id', 'meetups.name', 'meetups.slug')
|
||||
->get()
|
||||
->map(fn($meetup) => [
|
||||
'id' => $meetup->id,
|
||||
'name' => $meetup->name,
|
||||
'link' => route('meetup.landing', [
|
||||
'country' => $meetup->city->country->code,
|
||||
'meetup' => $meetup,
|
||||
])
|
||||
])
|
||||
->toArray();
|
||||
if (count($this->myMeetups) > 0) {
|
||||
$this->hasMeetups = true;
|
||||
@@ -80,11 +92,6 @@ class Meetups extends Component
|
||||
->get();
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.profile.meetups');
|
||||
}
|
||||
|
||||
public function signUpForMeetup($id)
|
||||
{
|
||||
$user = auth()->user();
|
||||
@@ -108,4 +115,9 @@ class Meetups extends Component
|
||||
$this->notification()
|
||||
->success(__('Saved.'));
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.profile.meetups');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user