@props(['news']) @php $title = (string) ($news->title ?? 'News update'); $date = ($news->published_at ?: $news->created_at)?->format('d M Y'); $imagePath = $news->image_path ?? null; $imageUrl = is_string($imagePath) && trim($imagePath) !== '' ? \Illuminate\Support\Facades\Storage::disk('public')->url(ltrim($imagePath, '/')) : null; $excerpt = trim((string) ($news->excerpt ?? '')); if ($excerpt === '') { $excerpt = \Illuminate\Support\Str::limit(strip_tags((string) ($news->body ?? '')), 120); } @endphp
merge(['class' => 'group overflow-hidden rounded-[1.75rem] border border-slate-200 bg-white shadow-sm transition duration-300 hover:-translate-y-1 hover:border-[#f15a24]/40 hover:shadow-xl hover:shadow-[#292b86]/10']) }}>
@if($imageUrl) {{ $title }} @else
iTechBD Update
@endif @if($date)
{{ $date }}
@endif

{{ $title }}

{{ $excerpt }}

Read update