@php
// ترتيب اللغة العربية لتكون دائماً في البداية إذا كانت موجودة
$languages = collect($languages);
if ($languages->contains('ar')) {
$languages = $languages->sortBy(function ($locale) {
return $locale === 'ar' ? 0 : 1;
});
}
@endphp
@foreach ($languages as $index => $locale)
@if ($errors->has("{$locale}.title"))
{{ $errors->first("{$locale}.title") }}
@endif
@if ($errors->has("{$locale}.title"))
{{ $errors->first("{$locale}.title") }}
@endif
@endforeach