Skip to content

Commit

Permalink
Added pagination to the event name list.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjdejong committed Feb 7, 2024
1 parent 249b6c6 commit ec24647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Http/Controllers/EventNameController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public function index(Request $request)
$ename = $ename->where('name', 'like', $Name.'%');
}

$enameslist = $ename->get();
$enameslist = $ename->paginate(21);
$enameslist->appends($request->input())->links();

return view('eventname.index', compact('enameslist'));
}
Expand Down
5 changes: 5 additions & 0 deletions resources/views/eventname/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<td>{{ $event->notes }}</td>
</tr>
@endforeach
<tr>
<td colspan="5">
{{ $enameslist->links() }}
</td>
</tr>
</tbody>
</table>
</div>
Expand Down

0 comments on commit ec24647

Please sign in to comment.