Add manual authentication, create, read, update task

This commit is contained in:
Thuan Bui
2025-03-06 17:00:09 +09:00
parent 154c37bce6
commit 67db6acefd
13 changed files with 325 additions and 20 deletions
@@ -0,0 +1 @@
<button type="submit" {{ $attributes->merge(['class' => 'rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600'])}}>{{ $slot }}</button>
@@ -0,0 +1,4 @@
@props(['name'])
@error($name)
<p class="text-xs text-red-500">{{ $message}}</p>
@enderror
+4 -10
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Tailwind Layout</title>
<title>{{ $heading }}</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="flex flex-col min-h-screen bg-gray-100">
@@ -11,17 +11,11 @@
<header class="bg-white shadow">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<!-- Title on left -->
<h1 class="text-xl font-bold text-gray-800">MoveMate</h1>
<a href="/"><h1 class="text-xl font-bold text-gray-800">MoveMate</h1></a>
<!-- Navigation on right -->
<nav>
<ul class="flex space-x-6">
<li><a href="#" class="text-gray-600 hover:text-gray-900">Home</a></li>
<li><a href="#" class="text-gray-600 hover:text-gray-900">About</a></li>
<li><a href="#" class="text-gray-600 hover:text-gray-900">Services</a></li>
<li><a href="#" class="text-gray-600 hover:text-gray-900">Contact</a></li>
</ul>
</nav>
<x-nav />
</div>
</header>
@@ -0,0 +1 @@
<li><a {{ $attributes->merge(['class' => 'text-gray-600 hover:text-gray-900']) }}> {{ $slot }}</a></li>
+16
View File
@@ -0,0 +1,16 @@
<nav>
<ul class="flex space-x-6 items-center ">
@guest
<x-nav-link href="/login">Login</x-nav-link>
<x-nav-link href="/register">Register</x-nav-link>
@endguest
@auth
<x-nav-link type="button" href="/task/create">Create new task</x-nav-link>
<form method="POST" action="/logout">
@csrf
<x-form-button>Log Out</x-form-button>
</form>
@endauth
</ul>
</nav>