diff --git a/src/app/Http/Controllers/AccountController.php b/src/app/Http/Controllers/AccountController.php index bba27d05..9219866f 100644 --- a/src/app/Http/Controllers/AccountController.php +++ b/src/app/Http/Controllers/AccountController.php @@ -27,7 +27,9 @@ public function index() $creditLogs = $user->creditLogs()->paginate(5, ['*'], 'cl'); } $purchases = $user->purchases()->paginate(5, ['*'], 'pu'); - $tickets = $user->eventParticipants()->paginate(5, ['*'], 'ti'); + $tickets = $user->eventParticipants() + ->orderBy('created_at', 'desc') + ->paginate(5, ['*'], 'ti'); return view("accounts.index") ->withUser($user) ->withCreditLogs($creditLogs) diff --git a/src/resources/views/accounts/index.blade.php b/src/resources/views/accounts/index.blade.php index a6ab4729..c9109507 100644 --- a/src/resources/views/accounts/index.blade.php +++ b/src/resources/views/accounts/index.blade.php @@ -284,6 +284,7 @@ class="img-fluid img-thumbnail mb-3" /> @foreach ($eventParticipants as $participant) @include ('layouts._partials._tickets.index') @endforeach + {{ $eventParticipants->links() }} @else @lang('accounts.no_tickets') @endif