orderBy('date', 'desc') ->get() ->map(fn ($entry) => [ 'id' => $entry->id, 'date' => $entry->date->format('m/d/Y'), 'title' => $entry->title, 'summary' => $entry->summary, 'documents' => $entry->documents->map(fn ($doc) => [ 'id' => $doc->id, 'title' => $doc->title, 'file_path' => $doc->file_path, ]), ]); return Inertia::render('Home', [ 'docketEntries' => $docketEntries, 'caseInfo' => [ 'title' => 'Elizabeth Kragh v. Montana Association of the Deaf', 'status' => 'Active Litigation', 'lastUpdated' => $docketEntries->first()['date'] ?? 'No entries yet', ], ]); } }