@php $mem = \App\Support\Membership::for($user); @endphp
{{ __($mem['tier']['name']) }}{{ __('會員') }}
{{ __('購買課程享 :n% 折扣', ['n' => $mem['tier']['discount']]) }} ・ {{ __('累計消費 :amount', ['amount' => money($mem['spent'])]) }}
@if ($mem['next'])
{{ __('再消費 :amount 升級為 :tier會員(:n% 折扣)', ['amount' => money($mem['remaining']), 'tier' => __($mem['next']['name']), 'n' => $mem['next']['discount']]) }}
@else
{{ __('已是最高等級') }}
@endif
@foreach ([[__('總經驗值'), number_format($user->xp).' XP', 'chart'], [__('本月獲得'), '+'.number_format($user->monthXp()).' XP', 'trophy'], [__('連續學習'), __(':n 天', ['n' => $user->currentStreak()]), 'flask'], [__('完成課程'), __(':n 門', ['n' => $user->completedCourseCount()]), 'award']] as [$l, $v, $ic])
@endforeach