@extends('layouts.app') @section('content') @include('partials.navbar')

Articles by {{ $user->name }}

@foreach ($articles as $article)
@if ($article->article_image) @php $path = $article->article_image; if (str_starts_with($path, 'uploads/')) { $imageUrl = asset($path); // old images } else { $imageUrl = asset('storage/' . $path); // new images } @endphp Article Image @endif     By {{ $user->name }} | 📅 {{ $article->created_at->format('d F Y') }}
{{ $article->title }}

⏱ {{ $article->reading_time }} min read | 📝 {{ $article->word_count }} words

@endforeach
{{ $articles->links() }}
@endsection