@extends('layouts.main') @section('title') {{__("Custom Fields")}} @endsection @section('page-title')

@yield('title')

@endsection @section('content')
@csrf
{{__("Create Custom Field")}}
@foreach($languages as $key => $lang)
id != 1) required @endif>
@if($lang->id == 1) {{-- Type (Only in English) --}}
@else
{{ __('Field type, min/max length, required and status can only be set in English.') }}
@endif
@if($lang->id != 1) {{ __('Used for translatable field types.') }} @endif
@endforeach
{{__("(use 256 x 256 size for better view)")}}
{{ __('Required') }}
{{ __('Active') }}
@if ($cat_id == 0)
{{__("Category")}}
@foreach ($categories as $category)
@if (!empty($category->subcategories)) @php // Get current language from Session (not from foreach loop) $currentLang = Session::get('language'); // Check RTL: use accessor which returns boolean (rtl != 0) $isRtl = false; if (!empty($currentLang)) { try { // Try to get raw attribute first, fallback to accessor $rtlRaw = method_exists($currentLang, 'getRawOriginal') ? $currentLang->getRawOriginal('rtl') : null; if ($rtlRaw !== null) { $isRtl = ($rtlRaw == 1 || $rtlRaw === true); } else { $isRtl = ($currentLang->rtl == true || $currentLang->rtl === 1); } } catch (\Exception $e) { $isRtl = ($currentLang->rtl == true || $currentLang->rtl === 1); } } $arrowIcon = $isRtl ? '' : ''; // fa-caret-left for RTL, fa-caret-right for LTR @endphp {!! $arrowIcon !!} @endif
@endforeach
@else @endif
@endsection @section('js') @endsection