41 lines
1.9 KiB
PHP
41 lines
1.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="mb-6">
|
|
<h1 class="text-3xl font-bold text-indigo-700">Create New Category</h1>
|
|
</div>
|
|
|
|
<div class="bg-white shadow-md rounded-lg p-6">
|
|
<form action="{{ route('categories.store') }}" method="POST">
|
|
@csrf
|
|
|
|
<div class="mb-4">
|
|
<label for="name" class="block text-gray-700 text-sm font-bold mb-2">Name:</label>
|
|
<input type="text" name="name" id="name" value="{{ old('name') }}"
|
|
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('name') border-red-500 @enderror">
|
|
@error('name')
|
|
<p class="text-red-500 text-xs italic mt-1">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<label for="description" class="block text-gray-700 text-sm font-bold mb-2">Description:</label>
|
|
<textarea name="description" id="description" rows="4"
|
|
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline @error('description') border-red-500 @enderror">{{ old('description') }}</textarea>
|
|
@error('description')
|
|
<p class="text-red-500 text-xs italic mt-1">{{ $message }}</p>
|
|
@enderror
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<button type="submit" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
|
|
Create Category
|
|
</button>
|
|
<a href="{{ route('categories.index') }}" class="text-indigo-600 hover:text-indigo-800">
|
|
Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endsection
|