mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
new header
This commit is contained in:
@@ -22,24 +22,32 @@ class LecturerLandingPage extends Component
|
||||
{
|
||||
return view('livewire.school.lecturer-landing-page', [
|
||||
'courseEvents' => CourseEvent::query()
|
||||
->with([
|
||||
'venue.city',
|
||||
'course.tags',
|
||||
])
|
||||
->where('from', '>=', now())
|
||||
->whereHas('course', function ($query) {
|
||||
$query->where('lecturer_id', $this->lecturer->id);
|
||||
})
|
||||
->orderBy('from')
|
||||
->get(),
|
||||
'events' => CourseEvent::query()
|
||||
'events' => CourseEvent::query()
|
||||
->with([
|
||||
'venue',
|
||||
'course',
|
||||
])
|
||||
->where('from', '>=', now())
|
||||
->whereHas('course', function ($query) {
|
||||
$query->where('lecturer_id', $this->lecturer->id);
|
||||
})
|
||||
->orderBy('from')
|
||||
->get()
|
||||
->map(fn ($event) => [
|
||||
'id' => $event->id,
|
||||
'startDate' => $event->from,
|
||||
'endDate' => $event->to,
|
||||
'location' => $event->course->name,
|
||||
->map(fn($event) => [
|
||||
'id' => $event->id,
|
||||
'startDate' => $event->from,
|
||||
'endDate' => $event->to,
|
||||
'location' => $event->course->name,
|
||||
'description' => $event->venue->name,
|
||||
]),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user