Authentication System Complete (50% of Phase 2): - Created Admin AuthController with login/logout - Created AdminAuth middleware for session-based auth - Registered middleware in bootstrap/app.php - Configured all admin routes with protection - Created 4 admin controller files (Dashboard, DocketEntry, Document, Subscriber) Session-based authentication: - Stores admin_id and admin_username in session - Middleware checks for admin_id presence - Separate from Laravel Breeze User auth - Uses AdminUser model with auto-hashing passwords Routes configured: - Public: GET/POST /admin/login - Protected: /admin/dashboard, /admin/docket-entries (CRUD), /admin/documents, /admin/subscribers Remaining work (50%): - Implement controller logic (7 methods for DocketEntry, etc.) - Create 9 Vue admin pages (Login, Dashboard, CRUD forms) - Create AdminSeeder for default admin user - Configure file storage for PDF uploads - Test all admin features See cline_docs/phase2_progress.md for detailed next steps
26 lines
856 B
PHP
26 lines
856 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
->withRouting(
|
|
web: __DIR__.'/../routes/web.php',
|
|
commands: __DIR__.'/../routes/console.php',
|
|
health: '/up',
|
|
)
|
|
->withMiddleware(function (Middleware $middleware): void {
|
|
$middleware->web(append: [
|
|
\App\Http\Middleware\HandleInertiaRequests::class,
|
|
\Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
|
|
]);
|
|
|
|
// Register admin auth middleware
|
|
$middleware->alias([
|
|
'admin.auth' => \App\Http\Middleware\AdminAuth::class,
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|