Commit 2f3a32bd authored by Maik Messerschmidt's avatar Maik Messerschmidt
Browse files

Added pagination of inputs and delete-route.

parent f4cfca3a
......@@ -17,7 +17,7 @@ class InputController extends Controller
public function index()
return view('inputs.index', ["inputs" => Input::without('data')->get()]);
return view('inputs.index', ["inputs" => Input::without('data')->paginate(10)]);
......@@ -105,8 +105,8 @@ class InputController extends Controller
* @param int $id
* @return \Illuminate\Http\Response
public function destroy($id)
public function destroy(Input $input) {
return back();
<table class="table">
<table class="table table-striped">
<th scope="col">uid</th>
<th scope="col">uploaded on</th>
<th scope="col">listed</th>
<th scope="col">uses</th>
<th scope="col">max uses</th>
<th scope="col">listed</th>
<th scope="col">use count increments</th>
<th scope="col"><!-- actions column --></th>
......@@ -18,9 +18,9 @@
<td>{{ $input->id }}</td>
<td>{{ $input->created_at }}</td>
<td>{{ $input->listed ? "yes" : "no" }}</td>
<td>{{ $input->uses }}</td>
<td>{{ $input->max_uses ?? '∞'}}</td>
<td>{{ $input->listed ? "yes" : "no" }}</td>
<td>{{ $input->increments }}</td>
<a href="{{ route('', $input) }}"
......@@ -28,9 +28,9 @@
<i class="fa fa-eye"></i>
<a href="_blank" class="confirm-delete" title="Remove these results"
<a href="_blank" class="confirm-delete" title="Remove this entry"
data-message="Do you really want to delete this result?">
data-message="Do you really want to delete this input?">
<i class="fa fa-remove"></i>
......@@ -48,6 +48,10 @@
<div class="d-flex justify-content-center">
{{ $inputs->links() }}
<a href="{{ route('inputs.create')}}">Create a new entry</a>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment