Added ColorController & Views

This commit is contained in:
2025-03-10 20:02:13 +01:00
parent d8f429385d
commit 9826f89806
8 changed files with 287 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<x-app-layout>
<x-slot name="header">
{{ __('Create Colors') }}
</x-slot>
<x-slot name="headeraction">
<div class="flex gap-4 justify-end">
<a href="{{ route('colors.index') }}" class=" text-zinc-50 hover:text-zinc-300 font-bold text-base py-2 px-4 rounded cursor-pointer">Back</a>
<a href="{{ route('colors.store') }}" onclick="event.preventDefault(); document.getElementById('create-color-form').submit();" class="bg-green-500 hover:bg-green-700 text-zinc-700 hover:text-white font-bold text-base py-2 px-4 rounded cursor-pointer">Submit</a>
</div>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white dark:bg-zinc-700 p-4 overflow-hidden shadow-xl sm:rounded-lg">
<form id="create-color-form" class="flex flex-col gap-6" method="POST" action="{{ route('colors.store') }}">
@csrf
<div class="form-group flex flex-col">
<label for="name" class="text-lg ">Name</label>
<input type="text" id="name" name="name" class="form-control bg-white dark:bg-zinc-800 border-zinc-50 dark:border-zinc-600 rounded" required="">
</div>
<div class="form-group flex flex-col">
<label for="name" class="text-lg ">Hex Code</label>
<input type="text" id="hex" name="hex" class="form-control bg-white dark:bg-zinc-800 border-zinc-50 dark:border-zinc-600 rounded" required="">
</div>
<div class="flex justify-end gap-4">
<a href="{{ route('colors.index') }}" class="bg-zinc-500 hover:bg-zinc-700 text-zinc-800 hover:text-white font-bold py-2 px-4 rounded cursor-pointer">Cancel</a>
<button type="submit" class="bg-green-500 hover:bg-green-700 text-zinc-800 hover:text-white font-bold py-2 px-4 rounded cursor-pointer">Submit</button>
</div>
</form>
</div>
</div>
</div>
</x-app-layout>