{{-- resources/views/category_articles.blade.php --}} @extends('layouts.app') @section('content') @include('partials.navbar') @include('articles.partials.home-css') {{--
← Back to Homepage
--}}
{{-- Back to Home --}}

{{ $category->name }}

Analysis


{{--

{{ $category->name }} Analysis

--}}
@foreach ($articles as $article)

{{ $article->category ? $article->category->name : ' ' }}

{{ $article->title }}

{!! Str::words(strip_tags($article->description), 150, '...') !!}

@if ($article->writer_photo) @php $path = $article->writer_photo; // Old photos (public/uploads/...) if (str_starts_with($path, 'uploads/')) { $photoUrl = asset($path); } // New photos (storage/app/public/...) else { $photoUrl = asset('storage/' . $path); } @endphp Writer Photo By {{ $article->user->name }}  | {{ $article->created_at->format('d F , Y') }} | {{ $article->word_count }} @endif {{-- @if ($article->writer_photo) writer_photo}") }}" alt="Writer Photo" style="max-width: 100px; height: auto;" class="writer-photo"> By {{ $article->user->name }}  | {{ $article->created_at->format('d F , Y') }} | {{ $article->word_count }} @endif --}} @if ($article->article_image) @php $path = $article->article_image; // Old images (last year): public/uploads/... if (str_starts_with($path, 'uploads/')) { $imageUrl = asset($path); } // New images: storage/app/public/... else { $imageUrl = asset('storage/' . $path); } @endphp Article Image @endif {{-- @if ($article->article_image) article_image}") }}" alt="Article Image" style="width: 800px !important; height: 525px !important;" class="article-image mt-3"> @endif --}}
@if ($article->credit)

Image Credit: {{ $article->credit }}

@endif
{{-- --}}

{!! $article->content !!}

@if ($article->user->bio)
{{--
About the Author:
--}}

{{ $article->user->name }}

{{ $article->user->bio ?? 'Africa Tech Insights' }}

{{--

This is an opinion piece. The views expressed in this article are those of just the author.

--}} @else
About the Author:

{{ $article->user->name }}

No bio available for this user.

@endif


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