@extends('layouts.admin') @section('title', isset($category) ? 'Edit Category' : 'Add Category') @section('page_title', isset($category) ? 'Edit Category' : 'Add New Category') @section('content')
{{ isset($category) ? 'Edit Category Information' : 'Category Details' }}
@csrf @if(isset($category)) @method('PUT') @endif
@error('name')
{{ $message }}
@enderror
@error('slug')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
@error('parent_id')
{{ $message }}
@enderror
Allowed formats: JPG, PNG, GIF, WebP. Max size: 2MB @error('image')
{{ $message }}
@enderror @if(isset($category) && $category->image)
{{ $category->name }} Current image (upload a new one to replace)
@endif
is_active : 1) == 1 ? 'checked' : '' }}>
Cancel
Quick Info
@if(isset($category))
Category ID

#{{ $category->id }}

Products

{{ $category->products->count() }}

Created

{{ $category->created_at->format('M d, Y') }}

Last Updated

{{ $category->updated_at->format('M d, Y H:i') }}

@else

Fill in the form to create a new category

@endif
@endsection