Dashboard

@php $hour = now()->hour; $greeting = $hour < 12 ? 'Good morning' : ($hour < 18 ? 'Good afternoon' : 'Good evening'); $firstName = Str::before(Auth::user()->name, ' '); $isAdmin = Auth::user()->isAdmin(); $figures = $team ? [ ['Learners', number_format($team['learners'])], ['Courses live', number_format($team['courses'])], ['Enrolments', number_format($team['enrollments'])], ['Lessons done this week', number_format($team['done_week'])], ] : [ ['Overall progress', $stats['progress'].'%'], ['Lessons done', $stats['done_lessons'].' / '.$stats['total_lessons']], ['In progress', $stats['in_progress']], ['Completed', $stats['completed']], ]; @endphp {{-- Hero: full width, same language as the landing page --}}

{{ $greeting }}, {{ $firstName }}.

@if ($nextLesson)

{{ $nextLesson->title }}

Next up in {{ $nextCourse->title }}

@elseif ($enrolled->isNotEmpty())

You've finished every course.

New courses will show up here as soon as you're enrolled.

@elseif ($team)

Your team finished {{ $team['done_week'] }} {{ Str::plural('lesson', $team['done_week']) }} this week.

{{ $team['courses'] }} courses are live for {{ $team['learners'] }} learners.

@if ($isAdmin) Enrol learners @endif Manage courses
@else

Your courses will appear here.

Your admin will enrol you in the training you need.

@endif
@if ($path)
{{-- Numbers --}}
@foreach ($figures as $i => [$label, $value])
$i > 0, 'pl-6 border-l border-white/10 lg:pl-8' => $i % 2 === 1])>
{{ $value }}
{{ $label }}
@endforeach
{{-- My courses --}}

My courses

{{-- Leaderboard --}}