@extends('layouts.app') @section('content')

Africa Tech Insights

Insights into Africa's Tech Evolution

@include('partials.news_ticker', [ 'articles' => \App\Models\ScrapedArticle::query()->where('is_ticker', 1)->orderByDesc('is_breaking')->orderBy('ticker_priority')->limit(20)->get(), ])

TOP STORIES
@foreach ($articles as $article)

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

{{ $article->title }}
Written by {{ $article->user->name }} | Posted on {{ $article->created_at->format('d F Y') }} @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 {{ $article->credit ? 'Image Credit: ' . $article->credit : '' }}

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

READ FULL ARTICLE @foreach ($articles as $article)

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

@endforeach @endforeach

    @foreach ($wired as $item)
    @if ($item->logo) @else Source Logo @endif {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }}

    {{ $item->title }}

    {!! $item->description !!}

    {{ $item->source }}

    {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }} @if ($item->image) Image @endif
    @endforeach


      @foreach ($feedsAfria as $feed)
    • {{ $feed->category ?? 'General' }}

      {{ $feed->title }}

      {{ \Illuminate\Support\Str::limit(strip_tags($feed->description ?? ''), 150) }}

      {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author ?? $feed->source }}
    • @endforeach



      @foreach ($construction as $item) @php $cleanDescription = preg_replace('/]+>/i', '', $item->description); @endphp

      News from Seattle

      @if ($item->logo) Source Logo
      @endif
      @if ($item->image) Image @endif

      {{ \Illuminate\Support\Str::limit($item->title, 80) }}

      {!! $cleanDescription !!}

      {{-- {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }} --}}
      @endforeach
          {{-- @php $chunks = $flaskMitoArticles->chunk(1); @endphp @foreach ($chunks as $chunk)
          @foreach ($chunk as $article)
          @if ($article->logo) @endif @if ($article->logo1) Logo1 @endif
          {{ $article->badge }}
          {{ Str::limit($article->title, 80) }}

          {{ Str::limit($article->description, 100) }}

          @endforeach
          @endforeach --}}


          @if ($latestFund)

          🚀 Latest Startup Funding

          {{ \Illuminate\Support\Str::limit($latestFund->description, 280) }}

          Read More →
          @endif

          🔥Today’s Hot Takes

          @foreach ($opinions->take(1) as $opinion)
          {{ $opinion->title }}
          @foreach ($articles as $article)

          ⏱ {{ $opinion->reading_time }} min read | 📝 {{ $opinion->word_count }} words | 📅 {{ $opinion->created_at->format('d F Y') }}

          @endforeach

          {{ \Illuminate\Support\Str::limit($opinion->brief_description, 400) }}

          READ MORE
          @endforeach

          🎙 Audio Tech News {{ date('F j, Y') }}

          Loading latest tech summary...

          {{--
          @foreach ($opinions->take(1) as $opinion)
          {{ $opinion->title }}
          @foreach ($articles as $article)

          ⏱ {{ $opinion->reading_time }} min read | 📝 {{ $opinion->word_count }} words | 📅 {{ $opinion->created_at->format('d F Y') }}

          @endforeach

          {{ \Illuminate\Support\Str::limit($opinion->brief_description, 400) }}

          READ MORE
          @endforeach
          --}}

              @foreach ($feedsNgo as $feed)
            • {{ $feed->category ?? 'General' }}

              {{ $feed->title }}

              {{ \Illuminate\Support\Str::limit(strip_tags($feed->description ?? ''), 150) }}

              {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author ?? $feed->source }}
            • @endforeach

              @foreach ($feedsPodezi as $feed)
            • {{ $feed->category ?? 'Uncategorized' }}

              {{ $feed->title }}

              {{ \Illuminate\Support\Str::limit(strip_tags($feed->description), 150) }}

              {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author ?? 'Unknown' }} | Source: {{ $feed->source_name }}
            • @endforeach

            @foreach ($verge as $item)
            @if ($item->logo) Source Logo @endif

            {{ $item->source }} | {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }}

            {{ $item->title }}

            @php $cleanDescription = preg_replace('/]+>/i', '', $item->description); @endphp

            {!! $cleanDescription !!}

            @endforeach


              @foreach ($feedsTechradar as $feed)

              {{ $feed->title }}

              {{ \Illuminate\Support\Str::limit(strip_tags($feed->description), 150) }}

              {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author }}
              @endforeach
            @foreach ($feedsGad as $feed)

            {{ $feed->title }}

            {{ \Illuminate\Support\Str::limit(strip_tags($feed->description), 150) }}

            {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author }}
            @endforeach
              @foreach ($feedsGadv as $feed)

              {{ $feed->title }}

              {{ \Illuminate\Support\Str::limit(strip_tags($feed->description), 150) }}

              {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author }}
              @endforeach

                Featured

                @php $topArticles = $topArticles->sortByDesc('created_at'); @endphp @foreach ($topArticles as $item)
                @if ($item->user && $item->user->avatar) {{ $item->user->name }} {{ $item->user->name }} @endif
                {{ $item->title }}
                {{ $item->created_at->format('d F , Y') }} | {{ $item->readingTime }} min read

                @endforeach
                @foreach ($lunixinsider as $item)
                @if ($item->logo) Source Logo @endif

                {{ $item->title }}

                {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }} | {{ $item->source }}

                {!! $item->description !!}

                @endforeach


                @foreach ($cRMBuyer as $item)
                @if ($item->logo) Source Logo @endif

                {{ $item->title }}

                {{ \Carbon\Carbon::parse($item->published_at)->format('d-m-Y') }} | {{ $item->source }}

                {!! $item->description !!}

                @endforeach


                @foreach ($feedsArenaso as $feed)

                {{ $feed->title }}

                {{ \Illuminate\Support\Str::limit(strip_tags($feed->description), 150) }}

                {{ \Carbon\Carbon::parse($feed->pub_date)->format('M d, Y') }} | {{ $feed->author }}
                @endforeach @include('frontend.components.quote')
                @php $chunks = $flaskTopArticles->chunk(4); @endphp @foreach ($chunks as $chunk)
                @foreach ($chunk as $article)
                @if ($article->logo) @endif @if ($article->logo1) Logo1 @endif
                {{ $article->badge }}
                {{ Str::limit($article->title, 60) }}

                {{ Str::limit($article->description, 100) }}

                @endforeach
                @endforeach
                    {{--
                      --}}

                      AFRICA TECH INSIGHTS RECOMMENDS


                      @foreach ($articles as $article)

                      Featured Video: Watch Now!

                      @if ($video && $video->description)

                      @endif


                      @include('partials.more-articles')
                      @php // Group by website $grouped = $flaskBottomArticles->groupBy('website'); // Take only 1 article from each website $limited = $grouped->map(function ($group) { return $group->take(1); }); $bottomArticles = $limited->flatten(1); $chunks = $bottomArticles->chunk(6); @endphp @php $chunks = $flaskBottomArticles->chunk(6); @endphp @foreach ($chunks as $chunk)
                      @foreach ($chunk as $article)
                      @php $img = $article->image_url ?? ''; $isAbsolute = function ($url) { return (bool) preg_match('#^https?://#i', $url) || (bool) preg_match('#^//#', $url); }; $fullImage = $img; if ($img) { if ($isAbsolute($img)) { if (strpos($img, '//') === 0) { $fullImage = 'https:' . $img; } else { $fullImage = $img; } } else { // relative path -> build base from website_url or article link $baseCandidate = $article->website_url ?? ($article->link ?? null); if ($baseCandidate) { // parse host + scheme $parts = parse_url($baseCandidate); $scheme = $parts['scheme'] ?? 'https'; // host may not exist if website_url was something odd; try path then $host = $parts['host'] ?? ($parts['path'] ?? null); if ($host) { $baseUrl = rtrim($scheme . '://' . $host, '/'); // make sure relative has single leading slash if (strpos($img, '/') !== 0) { $img = '/' . $img; } $fullImage = $baseUrl . $img; } else { // fallback: just leave as-is (browser will try relative to your site) $fullImage = $img; } } else { // no base to build from — leave as-is $fullImage = $img; } } } @endphp
                      @if ($article->logo) @endif @if ($article->logo1) Logo1 @endif
                      {{ $article->badge }}
                      {{ Str::limit($article->title, 60) }}

                      {{ Str::limit($article->description, 100) }}


                      @endforeach
                      @endforeach

                      Upcoming Tech Events

                      View All Events
                      @if (isset($techEvents) && $techEvents->count())
                      @foreach ($techEvents->take(3) as $event)
                      @if ($event->poster) {{ $event->title }} @else Event @endif
                      {{ $event->title }}
                      Date: {{ \Carbon\Carbon::parse($event->start_date)->format('M d, Y') }} - {{ \Carbon\Carbon::parse($event->end_date)->format('M d, Y') }}
                      {{ $event->location }} {{ $event->country ? ' - ' . $event->country : '' }}
                      View Event Details
                      @endforeach
                      @else
                      No upcoming tech events yet. Check back soon.
                      @endif

                      @endforeach
                      @foreach ($flaskSideArticles as $article)
                       
                      {{ $article->badge }}
                      {{ Str::limit($article->title, 90) }}
                      {{--

                      {{ Str::limit($article->description, 100) }}

                      --}}
                      @endforeach




                      @endsection {{-- --}} @php $video = \App\Models\FeaturedVideo::first(); @endphp {{-- --}}