@extends('Frontend.Master.authMaster') @section('content')
{{-- Search Bar --}}
{{-- Select + Download --}} @if($getData['first'] == 'no' && count($getData['mediaItems']) > 0)
@csrf
{{-- ✅ Wrap items inside a container for JS targeting --}}
@endif {{-- Results List --}}
@isset($getData) @forelse($getData['mediaItems'] as $item)
data-thumbnail
@if($getData['first'] == 'no') @endif
{{ $item->title }}
@php $tagsArray = is_array($item->tags) ? $item->tags : json_decode($item->tags, true); @endphp @foreach($tagsArray ?? [] as $tag) {{ is_array($tag) ? implode(', ', $tag) : $tag }} @endforeach

{{ Str::limit($item->description, 300, '...') }}

{{ $item->purpose }}

Uploaded at {{ \Carbon\Carbon::parse($item->created_at)->format('d.m.Y') }} Downloads {{ $item->download_count }} Views {{ $item->view_count }}
@empty @if($getData['first'] == 'no')

No matching documents found.

@endif @endforelse @if($getData['first'] == 'yes')

Start your search to see results.

@endif @endisset
@if($getData['first'] == 'no' && count($getData['mediaItems']) > 0)
@endif
{{-- ✅ Checkbox Logic --}} @endsection