@if(app()->getLocale() === 'ar') {{ __('navigation.search_news_sidebar') }} @else {{ __('navigation.search_news_sidebar') }} @endif
@if(app()->getLocale() === 'ar') @else @endif
@if(app()->getLocale() === 'ar') {{ __('navigation.categories') }} @else {{ __('navigation.categories') }} @endif
@foreach($categories as $category) @if(app()->getLocale() === 'ar') {{ $category->{'name_' . app()->getLocale()} ?? $category->name }} @else {{ $category->{'name_' . app()->getLocale()} ?? $category->name }} @endif {{ $category->news_count }} @endforeach
@if(app()->getLocale() === 'ar') {{ __('navigation.archives') }} @else {{ __('navigation.archives') }} @endif
@foreach($archives as $archive) @if(app()->getLocale() === 'ar') {{ $archive->year }} {{ \Carbon\Carbon::createFromFormat('!m', $archive->month)->locale('ar')->translatedFormat('F') }} @else {{ \Carbon\Carbon::createFromFormat('!m', $archive->month)->format('F') }} {{ $archive->year }} @endif {{ $archive->count }} @endforeach
@if(app()->getLocale() === 'ar') {{ __('navigation.featured_news') }} @else {{ __('navigation.featured_news') }} @endif
@foreach($featuredNews as $featured)
@if(app()->getLocale() === 'ar')
{{ Str::limit($featured->{'title_' . app()->getLocale()} ?? $featured->title, 50) }}
{{ $featured->published_at->locale('ar')->diffForHumans() }}
{{ $featured->title }} @else {{ $featured->title }}
{{ Str::limit($featured->{'title_' . app()->getLocale()} ?? $featured->title, 50) }}
{{ $featured->published_at->diffForHumans() }}
@endif
@endforeach
@if(app()->getLocale() === 'ar') {{ __('navigation.popular_tags') }} @else {{ __('navigation.popular_tags') }} @endif
@php $popularTags = [ 'Laravel' => __('tags.laravel'), 'Vue.js' => __('tags.vuejs'), 'React' => __('tags.react'), 'Mobile' => __('tags.mobile'), 'Web Development' => __('tags.web_development'), 'AI' => __('tags.ai'), 'Cloud' => __('tags.cloud'), 'Security' => __('tags.security') ]; @endphp @foreach($popularTags as $key => $tag) #{{ $tag }} @endforeach