@extends('admin.layouts.app') @section('title', __('Categories Management')) @section('breadcrumb') @endsection @section('page-header')

{{ __('Categories Management') }}

{{ __('Manage product categories with multilingual support') }}

{{ __('Add Category') }}
@endsection @push('styles') @endpush @section('content') {{-- Statistics Cards --}}
{{ __('Total Categories') }}

{{ $stats['total'] }}

{{ __('Active') }}

{{ $stats['active'] }}

{{ __('Inactive') }}

{{ $stats['inactive'] }}

{{ __('Root Categories') }}

{{ $stats['root'] }}

{{ __('Subcategories') }}

{{ $stats['child'] }}

{{-- Filters --}}
{{ __('Filters & Search') }}
{{-- Bulk Actions --}}
@csrf
0 {{ __('categories selected') }}
{{-- Categories Table --}}
{{ __('Categories') }} ({{ $categories->total() }})
@if($categories->count() > 0)
@foreach($categories as $category) {{-- Show subcategories if any --}} @if($category->children->count() > 0) @foreach($category->children as $child) @endforeach @endif @endforeach
{{ __('Image') }} {{ __('Category') }} {{ __('Code') }} {{ __('Products') }} {{ __('Status') }} {{ __('Order') }} {{ __('Created') }} {{ __('Actions') }}
@if($category->image) {{ $category->name }} @else
@endif
@if($category->parent) {{ $category->parent->name }} / @endif {{ $category->name }}
@if($category->description) {{ Str::limit($category->description, 50) }} @endif
{{ $category->code }} {{ $category->products->count() }} {{ __('products') }} {{ $category->is_active ? __('Active') : __('Inactive') }} {{ $category->sort_order }} {{ $category->created_at->format('M d, Y') }}
@if($child->image) {{ $child->name }} @else
@endif
{{ $child->name }}
@if($child->description) {{ Str::limit($child->description, 50) }} @endif
{{ $child->code }} {{ $child->products->count() }} {{ __('products') }} {{ $child->is_active ? __('Active') : __('Inactive') }} {{ $child->sort_order }} {{ $child->created_at->format('M d, Y') }}
{{-- Pagination --}}
{{ $categories->appends(request()->query())->links() }}
@else
{{ __('No categories found') }}

{{ __('Start by creating your first category') }}

{{ __('Create Category') }}
@endif
{{-- Delete Confirmation Modal --}} @endsection @push('scripts') @endpush