@php $search = request()->input('search'); $agenda = App\Models\Agenda::where('acara', 'like', '%' . $search . '%') ->orWhere('keterangan', 'like', '%' . $search . '%') ->get(); $article = App\Models\Artikel::where('judul', 'like', '%' . $search . '%') ->orWhere('content', 'like', '%' . $search . '%') ->get(); $content = App\Models\Content::where('title', 'like', '%' . $search . '%') ->orWhere('content', 'like', '%' . $search . '%') ->get(); $video = App\Models\Youtube::where('judul', 'like', '%' . $search . '%')->get(); $faq = App\Models\Faq::where('question', 'like', '%' . $search . '%') ->orWhere('answer', 'like', '%' . $search . '%') ->get(); $testimoni = App\Models\Testimoni::where('judul', 'like', '%' . $search . '%') ->where('jenis', 'testimoni') ->get(); $doa = App\Models\Testimoni::where('judul', 'like', '%' . $search . '%') ->where('jenis', 'doa') ->get(); @endphp @extends('layouts.webfront.page-details') @section('header_title', 'Search Result') @section('header_url_back', '/') @section('content')

Search Result For {{ $search }}

@if (count($agenda) > 0)

Agenda

@foreach ($agenda as $item) @endforeach
@endif @if (count($article) > 0)

Artikel

@foreach ($article as $item) @endforeach
@endif @if (count($content) > 0)

Content

@foreach ($content as $item) @endforeach
@endif @if (count($video) > 0)

Video

@foreach ($video as $item) @endforeach
@endif @if (count($faq) > 0)

FAQ

@foreach ($faq as $item) @endforeach
@endif @if (count($testimoni) > 0)

Testimoni

@foreach ($testimoni as $item) @endforeach
@endif
@endsection