mad-lawsuit/app/Http/Controllers/HomeController.php
TheMaddax b7125cf2b7 Phase 4: Production deployment configuration
- Add Docker configuration (Dockerfile, docker-compose.yml)
- Add Nginx and Supervisor configuration
- Add deployment documentation (DEPLOYMENT.md)
- Complete Phase 3 data migration (63 entries, 63 docs, 28 subs)
- Add responsive PDF viewer component
- Fix date format to American (MM/DD/YYYY)
- Update typography to match v1.0
- Add admin dashboard with full CRUD operations
- Configure PostgreSQL with secure password
- Connect to caddy_network for reverse proxy
- Ready for production deployment
2025-12-17 19:12:32 -07:00

40 lines
1.2 KiB
PHP

<?php
namespace App\Http\Controllers;
use App\Models\DocketEntry;
use Inertia\Inertia;
use Inertia\Response;
class HomeController extends Controller
{
/**
* Display the home page with all docket entries.
*/
public function index(): Response
{
$docketEntries = DocketEntry::with('documents')
->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',
],
]);
}
}