aboutsummaryrefslogtreecommitdiff
path: root/resources/views/admin.blade.php
blob: 4140b131588122b2ac82dc0b8ee5f3352f6cc2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
    <title>Admin</title>
    <link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body>
@if(Auth::check())
    <pre>Welcome admin!!</pre>
@endif
<h1>User List</h1>
@if($players->isEmpty())
    <p>No player found.</p>
@else
    <ul>
        @foreach($players as $player)
            <li>{{ $player->name }}</li>
        @endforeach
    </ul>
@endif
<form method="POST" action="/admin">
    @csrf

    <div>
        <label for="name">user:</label>
        <input name="name">
    </div>

    <div>
        <label for="team">team:</label>
        <input name="team">
    </div>

    @if($errors->any())
        <div class="error">{{ $errors->first() }}</div>
    @endif

    <button type="submit">submit</button>
</form>
<form method="POST" action="/logout">
    @csrf

    <button type="submit">logout</button>
</form>
</body>
</html>