- Replaced Next.js + Express + React stack with Laravel + Inertia + Vue - Created database migrations for docket_entries, documents, subscriptions, admin_users - Built Eloquent models with relationships (DocketEntry, Document, Subscription, AdminUser) - Implemented HomeController with Inertia.js integration - Created Vue home page component matching v1.0 design exactly - Installed Laravel Breeze for authentication scaffolding - Configured Vite 7 for Vue 3 + TypeScript compilation - Updated .gitignore for Laravel project structure - Tested locally - website rendering correctly with empty database - All v1.0 Next.js/Express files removed, replaced with Laravel structure Technology Stack: - Backend: Laravel 12.43.1, PHP 8.3.28, Eloquent ORM - Frontend: Vue 3, TypeScript, Inertia.js, Tailwind CSS 3.x - Build: Vite 7.x, Composer 2.9.2 - Database: SQLite (dev), PostgreSQL (production) Next steps: Email subscription API, document downloads, admin dashboard
29 lines
769 B
PHP
29 lines
769 B
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();
|
|
|
|
return Inertia::render('Home', [
|
|
'docketEntries' => $docketEntries,
|
|
'caseInfo' => [
|
|
'title' => 'Elizabeth Kragh v. Montana Association of the Deaf',
|
|
'status' => 'Active Litigation',
|
|
'lastUpdated' => $docketEntries->first()?->date?->format('F j, Y') ?? 'No entries yet',
|
|
],
|
|
]);
|
|
}
|
|
}
|