@extends('frontend.layouts.app') @section('title', 'Publication') @php use Carbon\Carbon; use App\Helpers\Helper; use Anuzpandey\LaravelNepaliDate\LaravelNepaliDate; @endphp @section('content') {{-- Hero Section --}} @include('frontend.partials.hero', [ 'mainHeading' => __('pages.publications'), 'subHeading' => __('pages.publications_tagline'), 'breadcrumb1' => [ 'name' => __('route.home'), 'route' => route('home'), ], 'breadcrumb2' => [ 'name' => __('route.publication'), 'route' => route('publication'), 'class' => 'text-gray-400', ], 'breadcrumb3' => null, 'breadcrumb4' => null, ])
@if (!$publicationCategories->isEmpty())
@foreach ($publicationCategories as $key => $publicationCategory) @php $publications = $publicationCategory->publications; @endphp @if ($publications->isEmpty())

{{ __('pages.no_details') }}

@else @foreach ($publications as $publication)
Image

{{ app()->getLocale() == 'en' ? $publication->name_en : $publication->name_np ?? $publication->name_en }}

{{ app()->getLocale() == 'en' ? $publication->published_date : LaravelNepaliDate::from($publication->published_date)->toNepaliDate(format: 'j F Y', locale: 'np') }} @isset($publication->author) {{ $publication->author }} @endisset

{!! Helper::stripInlineStyle( app()->getLocale() == 'en' ? $publication->short_description_en ?? '' : $publication->short_description_np ?? ($publication->short_description_en ?? ''), ) !!}

{{ __('pages.read_more') }}
@endforeach @endif @endforeach
@else

{{ __('pages.no_details') }}

@endif
@endsection @section('scripts') @endsection