Skip to content

Commit

Permalink
Merge pull request #939 from Lan2Play/feature/fixTicketViewAccountIndex
Browse files Browse the repository at this point in the history
fix ticket order and pagination in account
  • Loading branch information
Apfelwurm authored Nov 13, 2024
2 parents ff9d285 + 71b4f94 commit 8a22305
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/Http/Controllers/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/resources/views/accounts/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8a22305

Please sign in to comment.