How eukharistiamanurung/uas_224520026 works
Purpose and entry points
This is a Laravel server-rendered application for managing sports-field (Lapangan) reservations (Reservasi). It supports member booking/history flows and admin field, reservation-verification, reporting, and receipt flows. HTTP enters at public/index.php, is bootstrapped by bootstrap/app.php, and is dispatched through routes/web.php or routes/api.php.
Routing, controllers, and delivery surfaces
Web routes drive Blade pages through domain controllers: app/Http/Controllers/LapanganController.php, app/Http/Controllers/ReservasiController.php, and app/Http/Controllers/PdfController.php. Authentication/profile routes are handled by Laravel/Breeze-style controllers under app/Http/Controllers/Auth and app/Http/Controllers/ProfileController.php. A separate API boundary exists via routes/api.php, app/Http/Controllers/ApiController.php, and app/Http/Resources/LapanganResource.php.
Identity and authorization
Users are the principal identity and likely carry role-dependent behavior for admin versus member areas. Authentication, registration, password reset, and email verification are implemented in app/Http/Controllers/Auth/AuthenticatedSessionController.php, app/Http/Controllers/Auth/RegisteredUserController.php, and app/Models/User.php. Role enforcement is a custom middleware boundary at app/Http/Middleware/RoleMiddleware.php; route placement and middleware determine access to administrative management and reservation approval workflows.
Reservation domain and persistence
The core persisted aggregate consists of users, fields, and reservations: app/Models/User.php, app/Models/Lapangan.php, and app/Models/Reservasi.php. Schema ownership is explicit in database/migrations/2026_07_16_070628_create_lapangans_table.php and database/migrations/2026_07_16_070634_create_reservasis_table.php, alongside the standard user migration. Controllers mediate reads and state changes rather than exposing models directly; input is constrained at the HTTP boundary by app/Http/Requests/ReservasiRequest.php and field-specific request classes.
Primary application flows
Members navigate to a dashboard, create reservations, and inspect their history through resources/views/member/dashboard.blade.php, resources/views/member/reservasi/create.blade.php, and resources/views/member/reservasi/history.blade.php. Admins maintain field inventory and review/verify reservations via resources/views/admin/lapangan/index.blade.php, resources/views/admin/reservasi/index.blade.php, and resources/views/admin/reservasi/verifikasi.blade.php. The likely control path is route → middleware/auth → controller → validated request → Eloquent model/database → Blade redirect/render.
Reporting and document boundary
PDF generation is isolated behind app/Http/Controllers/PdfController.php, with dedicated document templates at resources/views/admin/pdf/kwitansi.blade.php and resources/views/admin/pdf/laporan.blade.php. This separates printable receipts and administrative reports from interactive reservation pages, while still sourcing domain data through the application’s model/controller layer.
Runtime and infrastructure
The runtime is PHP/Laravel, managed through artisan and Composer (composer.json), with a Vite-built frontend asset pipeline (package.json, vite.config.js). Laravel configuration exposes database, session, cache, queue, mail, filesystem, and logging infrastructure under config/. Database seeders (database/seeders/UserSeeder.php, database/seeders/LapanganSeeder.php) provide initial operational data. No specific external payment, storage, or third-party service integration is evidenced by the supplied tree.
Main entry points: ReservasiController.php Reservation workflow · Reservasi.php Reservations · Lapangan.php Fields · app.php Laravel bootstrap
Components 20
HTTP entry and routing
- PHP entry point
public/index.php - Laravel bootstrap
bootstrap/app.php - Web routes · Member and admin browser routes.
routes/web.php - API routes
routes/api.php
Application layer
- Authentication flows · Login, registration, reset, and verification.
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Role enforcement · Separates admin and member access.
app/Http/Middleware/RoleMiddleware.php - Field management
app/Http/Controllers/LapanganController.php - Reservation workflow · Creates, lists, and verifies reservations.
app/Http/Controllers/ReservasiController.php - Reservation validation
app/Http/Requests/ReservasiRequest.php - Reports and receipts
app/Http/Controllers/PdfController.php - Field API
app/Http/Controllers/ApiController.php - Field API resource
app/Http/Resources/LapanganResource.php
Delivery surfaces
- Member pages · Dashboard, booking, and reservation history.
resources/views/member/dashboard.blade.php - Admin pages · Field inventory and reservation verification.
resources/views/admin/reservasi/verifikasi.blade.php - Printable templates · Receipt and report documents.
resources/views/admin/pdf/kwitansi.blade.php
Domain and persistence
- Users · Identity and role-bearing accounts.
app/Models/User.php - Fields
app/Models/Lapangan.php - Reservations · Booking aggregate linking users and fields.
app/Models/Reservasi.php - Field schema
database/migrations/2026_07_16_070628_create_lapangans_table.php - Reservation schema
database/migrations/2026_07_16_070634_create_reservasis_table.php
Connections 23
- PHP entry point → Laravel bootstrap: boots
- Laravel bootstrap → Web routes: dispatches
- Laravel bootstrap → API routes: dispatches
- Web routes → Authentication flows: auth routes
- Web routes → Role enforcement: protects areas
- Role enforcement → Field management: admin access
- Role enforcement → Reservation workflow: member/admin access
- Authentication flows → Users: authenticates
- Field management → Fields: manages
- Field management → Admin pages: renders
- Reservation workflow → Reservation validation: validates input
- Reservation workflow → Reservations: reads and changes
- Reservation workflow → Member pages: renders
- Reservation workflow → Admin pages: renders
- Reports and receipts → Reservations: sources data
- Reports and receipts → Printable templates: generates
- API routes → Field API: dispatches
- Field API → Fields: reads
- Field API → Field API resource: serializes
- Reservations → Users: belongs to
- Reservations → Fields: books
- Fields → Field schema: persisted by
- Reservations → Reservation schema: persisted by