@extends('layouts.app') @section('page-title', 'Search Documents') @section('content') {{-- index.blade.php uses Bootstrap Icons (bi bi-*) throughout. If your layout already loads them, delete this line. --}} @php // "Home / Folder / Subfolder" for the folder that CONTAINS an item. $locationLabel = function ($containingFolder) { if (!$containingFolder) return 'Home'; return 'Home / ' . collect($containingFolder->breadcrumbs())->pluck('name')->implode(' / '); }; $uploaderName = function ($uploader) { if (!$uploader) return 'Unknown'; $full = trim(($uploader->first_name ?? '') . ' ' . ($uploader->last_name ?? '')); return $full !== '' ? $full : ($uploader->name ?? 'Unknown'); }; $total = $folders->count() + $files->count(); @endphp