{{-- resources/views/admin/brands/index.blade.php - FIXED VERSION WITH PROPER TINYMCE DATA LOADING --}} @extends('admin.layouts.app') @section('title', admin_trans('brands')) @section('page-title', admin_trans('brands')) @section('content')
{{ admin_trans('add_brand') }}
{{ admin_trans('clear_selection') }}
{{ admin_trans('activate') }} {{ admin_trans('deactivate') }} {{ admin_trans('feature') }} {{ admin_trans('unfeature') }} {{ admin_trans('delete') }}
@if ($brands->isEmpty()) {{ admin_trans('add_brand') }} @else
@foreach ($brands as $brand) @endforeach
{{ admin_trans('order') }} {{ admin_trans('logo') }} {{ admin_trans('name') }} {{ admin_trans('translations') }} {{ admin_trans('featured') }} {{ admin_trans('status') }} {{ admin_trans('actions') }}
{{ $brand->order ?? 0 }}
@if ($brand->getFirstMediaUrl('logo')) Brand Logo @else
@endif
@php $defaultLang = $languages->where('is_default', true)->first(); $translation = $brand->translations ->where('language_id', $defaultLang->id ?? 1) ->first(); @endphp
{{ $translation->name ?? 'Brand #' . $brand->id }} @if ($translation && $translation->description)
{!! strip_tags(Str::limit($translation->description, 60)) !!}
@endif
{{ $brand->translations->count() }}/{{ $languages->count() }}
@csrf @method('PATCH')
@csrf @method('PATCH')
@if ($brands->hasPages())
@endif @endif

{{ admin_trans('add_brand') }}

@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_logo') }}

SVG, PNG, JPG (max 2MB)

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

{{ admin_trans('edit_brand') }}

@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_logo') }}

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