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