@extends('layouts.app') @section('title', ($q ? 'Search: '.$q : 'Search').' | Homeland News') @section('meta_description', $q ? ('Search results for '.$q.' on Homeland News') : 'Search Homeland News for the latest stories and updates') @section('canonical', route('search.index', ['q' => $q])) @section('content')

Search

@if(! $q)
Type a keyword in the search box.
@elseif($articles->count() === 0)
No results for "{{ $q }}".
@else

Showing {{ $articles->total() }} results for "{{ $q }}"

@foreach($articles as $article) @php $img = $article->image_url ? (preg_match('/^https?:\/\//i',$article->image_url) ? $article->image_url : asset(ltrim($article->image_url,'/'))) : 'https://via.placeholder.com/640x360'; $author = optional($article->author)->name; @endphp @endforeach
{{ $articles->links() }}
@endif
@endsection