index.blade.php 1.71 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@extends('layouts.app')
@section('content')

<table class="table">
    <thead>
        <tr>
            <th scope="col">uid</th>
            <th scope="col">uploaded on</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>
        </tr>
    </thead>
    <tbody>
        @foreach ($inputs as $input)
        <tr>
            <td>{{ $input->id }}</td>
            <td>{{ $input->created_at }}</td>
            <td>{{ $input->uses }}</td>
22
            <td>{{ $input->max_uses ?? '∞'}}</td>
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
            <td>{{ $input->listed ? "yes" : "no" }}</td>
            <td>{{ $input->increments }}</td>
            <td>
               <a href="{{ route('inputs.show', $input) }}"
                  title="Show the input data payload">
                  <i class="fa fa-eye"></i>
              </a>

                <a href="_blank" class="confirm-delete" title="Remove these results"
                   data-form-id="remove-form-{{$input->id}}"
                   data-message="Do you really want to delete this result?">
                    <i class="fa fa-remove"></i>
                </a>

                {{ Form::open([
                    'url' => route('inputs.destroy', $input),
                    'method' => 'delete',
                    'style' => 'display: none',
                    'id' => "remove-form-{$input->id}"
                ]) }}
                {{ Form::submit('send') }}
                {{ Form::close() }}
            </td>
        </tr>
        @endforeach
    </tbody>
</table>

<a href="{{ route('inputs.create')}}">Create a new entry</a>

@endsection