@extends('admin.layouts.app') @section('title', admin_trans('categories')) @section('page-title', admin_trans('categories')) @section('content')
{{ admin_trans('add_category') }}
{{ admin_trans('clear_selection') }}
{{ admin_trans('activate') }} {{ admin_trans('deactivate') }} {{ admin_trans('feature') }} {{ admin_trans('unfeature') }} {{ admin_trans('delete') }}
@if ($categories->isEmpty()) {{ admin_trans('add_category') }} @else
@foreach ($categories as $category) @endforeach
{{ admin_trans('order') }} {{ admin_trans('icon') }} {{ admin_trans('name') }} {{ admin_trans('translations') }} {{ admin_trans('featured') }} {{ admin_trans('status') }} {{ admin_trans('actions') }}
{{ $category->order ?? 0 }}
@if ($category->getFirstMediaUrl('icon')) Category Icon @else
@endif
@php $defaultLang = $languages->where('is_default', true)->first(); $translation = $category->translations ->where('language_id', $defaultLang->id ?? 1) ->first(); @endphp
{{ $translation->name ?? 'Category #' . $category->id }} @if ($translation && $translation->description)
{!! strip_tags(Str::limit($translation->description, 60)) !!}
@endif
{{ $category->translations->count() }}/{{ $languages->count() }}
@csrf @method('PATCH')
@csrf @method('PATCH')
@if ($categories->hasPages())
@endif @endif

{{ admin_trans('add_category') }}

@csrf
@foreach ($languages as $language) @endforeach
@foreach ($languages as $language)

{{ admin_trans('content_in') }} {{ $language->native_name }}

{{ admin_trans('description') }}
@endforeach

{{ admin_trans('click_to_upload_icon') }}

SVG, PNG, JPG (max 2MB)

{{ admin_trans('click_to_upload_cover') }}

PNG, JPG, WebP (max 5MB)

{{ admin_trans('cancel') }} {{ admin_trans('create') }}

{{ admin_trans('edit_category') }}

@csrf @method('PUT') @if($languages->count() > 0)
@foreach($languages as $language) @endforeach
@foreach($languages as $language) @php $isRTL = $language->direction === 'rtl'; @endphp

{{ admin_trans('content_in') }} {{ $language->native_name }}

{{-- FIXED: TinyMCE with proper data binding --}}
{{ admin_trans('description') }}
@endforeach
@endif

{{ admin_trans('no_icon') }}

{{ admin_trans('no_cover') }}

{{ admin_trans('cancel') }} {{ admin_trans('update') }}
@endsection @push('scripts') @endpush