aboutsummaryrefslogtreecommitdiff
path: root/resources/views/admin.blade.php
diff options
context:
space:
mode:
authorryo <ryo@nopwd.lol>2025-03-11 16:15:29 +0000
committerryo <ryo@nopwd.lol>2025-03-11 16:15:29 +0000
commitfa4823dd632cad6a5736c1d900a064647bb72c20 (patch)
treea716b9d9f0ce62a9d2ca53f11d64b2a39b178d6c /resources/views/admin.blade.php
parente1a48c8208c181fd40ecb065878ba9ea49b1f48f (diff)
Added admin user that can change usres teamHEADmain
Fixed: player login based on user and password Added: show errors to the user
Diffstat (limited to 'resources/views/admin.blade.php')
-rw-r--r--resources/views/admin.blade.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/resources/views/admin.blade.php b/resources/views/admin.blade.php
new file mode 100644
index 0000000..4140b13
--- /dev/null
+++ b/resources/views/admin.blade.php
@@ -0,0 +1,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>