{{ __('Search Results') }}

@if (request()->has('q'))

{{ __('Results for: ') }}{{ request('q') }}

@endif
@php $query = request('q', ''); $posts = []; $pages = []; $products = []; if (!empty($query)) { if (function_exists('app')) { try { if (is_plugin_active('blog')) { $posts = app('Botble\Blog\Repositories\Interfaces\PostInterface') ->query() ->where('name', 'LIKE', "%{$query}%") ->orWhere('content', 'LIKE', "%{$query}%") ->limit(10) ->get(); } } catch (\Exception $e) {} } } @endphp @if (!empty($posts) && count($posts) > 0)

{{ __('Blog Posts') }}

@foreach ($posts as $post)
@include(Theme::getThemeNamespace('partials.blog.post-card'), ['post' => $post])
@endforeach
@endif @if ((empty($posts) || count($posts) === 0) && empty($query))

{{ __('Please enter a search query.') }}

@elseif ((empty($posts) || count($posts) === 0) && !empty($query))

{{ __('No results found for your search.') }}

@endif