@extends('layouts.app') @section('content') {{-- Page Header --}} {{-- Categories Table --}}
@forelse($categoryPaginations as $category) @empty @endforelse
# {{ __('Name') }} {{ __('Parent Category') }} {{ __('Thumbnail') }} {{ __('Featured') }} {{ __('Actions') }}
{{ $loop->iteration }}
{{ $category->name }}
{{ $category->parent_id ? $category->parent->name : '-' }} @if ($category->thumbnail_id && $category->thumbnail) Thumbnail @else {{ __('No Image') }} @endif @php $isFeatured = $category->is_featured; $bgColor = $isFeatured ? 'bg-success' : 'bg-danger'; $textColor = $isFeatured ? 'text-white' : 'text-white'; $statusText = $isFeatured ? 'Yes' : 'No'; @endphp {{ $statusText }}
@can('category.show') @endcan @can('category.edit') @endcan @can('category.destroy') @endcan
{{ __('No categories found.') }}
{{-- Pagination --}}
{{ $categoryPaginations->links() }}
@endsection