Category Name *
@error('name')
{{ $message }}
@enderror
Slug (optional - auto-generated from name)
Leave blank to auto-generate from category name
@error('slug')
{{ $message }}
@enderror
Description
@error('description')
{{ $message }}
@enderror
Icon (HTML, emoji, or icon class)
@if($salePostCategory->icon)
{!! $salePostCategory->icon !!}
@endif
Enter an emoji (📱) or HTML for an icon
@error('icon')
{{ $message }}
@enderror
Parent Category
None (Root Category)
@foreach(\App\Models\SalePostCategory::where('id', '!=', $salePostCategory->id)->whereNull('parent_id')->get() as $category)
parent_id) == $category->id ? 'selected' : '' }}>
{{ $category->name }}
@endforeach
Select a parent to make this a subcategory
@error('parent_id')
{{ $message }}
@enderror
@if($salePostCategory->children->count() > 0)
This category has {{ $salePostCategory->children->count() }} subcategories:
@foreach($salePostCategory->children as $child)
{{ $child->name }}
@endforeach
@endif