How lshrsmatmpbln/uasprakpweblashi works
Purpose and Runtime
This is a Laravel/PHP application for managing sports-field (Lapangan) reservations (Reservasi). It serves server-rendered admin and member workflows, authentication/profile management, API endpoints, and PDF-oriented reservation reporting/receipts. The README is Laravel boilerplate; the domain is inferred from application structure.
HTTP enters through public/index.php, Laravel boots via bootstrap/app.php, and route definitions are split between routes/web.php and routes/api.php.
Routing, Access, and Session Identity
Web routes dispatch to MVC controllers, with Laravel’s auth stack handling registration, login, password reset, email verification, and password confirmation. Role-based authorization is a distinct boundary, likely separating admin management functions from member booking functions.
Key paths:
• routes/web.php
• app/Http/Controllers/AuthController.php
• app/Http/Middleware/RoleMiddleware.php
Reservation Domain Core
The central persisted entities are users, fields, and reservations. Eloquent models represent their relationships and controllers coordinate CRUD, booking/history, and administrative verification. Request objects isolate input validation before domain writes.
Key paths:
• app/Models/Lapangan.php
• app/Models/Reservasi.php
• app/Http/Controllers/ReservasiController.php
Schema ownership is in database/migrations/2026_07_16_070628_create_lapangans_table.php and database/migrations/2026_07_16_070634_create_reservasis_table.php; database configuration is selected through config/database.php.
Admin Operations
Administrators have dedicated dashboard, field-management, reservation-listing, and reservation-verification surfaces. LapanganController is the administrative inventory/catalog boundary; ReservasiController supports operational handling of bookings. Admin Blade templates render the resulting server-side state.
Key paths:
• app/Http/Controllers/LapanganController.php
• resources/views/admin/lapangan/index.blade.php
• resources/views/admin/reservasi/verifikasi.blade.php
Member Booking Flow
Authenticated members access a dedicated dashboard, create reservations against available fields, and review reservation history. The expected control flow is: web request → auth/role middleware → validated ReservasiRequest → reservation persistence → redirect/rendered member view.
Key paths:
• app/Http/Requests/ReservasiRequest.php
• resources/views/member/reservasi/create.blade.php
• resources/views/member/reservasi/history.blade.php
APIs and Representation Boundary
The application also exposes an API route surface. ApiController provides API orchestration, while LapanganResource defines a deliberate serialized representation for field data, keeping API payload formatting separate from the Eloquent model and Blade views.
Key paths:
• routes/api.php
• app/Http/Controllers/ApiController.php
• app/Http/Resources/LapanganResource.php
Reporting and Presentation
PdfController is the reporting/export boundary for reservation receipts (kwitansi) and reports (laporan). Standard web presentation uses Blade layouts/components and Vite-built CSS/JS, rather than a standalone frontend runtime.
Key paths:
• app/Http/Controllers/PdfController.php
• resources/views/admin/pdf/kwitansi.blade.php
• resources/views/layouts/app.blade.php
Infrastructure and External Boundaries
Laravel configuration supports database, session, cache, mail, filesystem storage, logging, and queues; concrete drivers and service credentials come from environment configuration. Database-backed cache and job migrations are present, so these facilities are provisionable even if domain code shown does not establish active usage. Local/public/private storage roots are under storage/app; frontend assets are built through Vite.
Key paths:
• config/database.php
• config/queue.php
• config/filesystems.php
Main entry points: ReservasiController.php Reservation operations · Lapangan.php Field model · Reservasi.php Reservation model · database.php Application database
Components 20
HTTP & Access
- Admin & member users
- Laravel entry point
public/index.php - Web routes
routes/web.php - Auth & role access · Authentication flows and role-based authorization gate web actions.
app/Http/Middleware/RoleMiddleware.php - Field administration
app/Http/Controllers/LapanganController.php - API routes
routes/api.php - Field API
app/Http/Controllers/ApiController.php - Field API representation · Separates API payload formatting from Eloquent and Blade rendering.
app/Http/Resources/LapanganResource.php
Reservation Domain
- Reservation operations · Handles booking, history, administration, and verification.
app/Http/Controllers/ReservasiController.php - Reservation validation
app/Http/Requests/ReservasiRequest.php - Field model
app/Models/Lapangan.php - Reservation model
app/Models/Reservasi.php
Presentation & Exports
- Admin field & verification views
resources/views/admin/lapangan/index.blade.php - Member booking view
resources/views/member/reservasi/create.blade.php - Member reservation history
resources/views/member/reservasi/history.blade.php - Reservation PDFs · Generates receipts and reservation reports.
app/Http/Controllers/PdfController.php - Receipt template
resources/views/admin/pdf/kwitansi.blade.php
Persistence
- Application database · Stores users, fields, and reservations through configured Laravel connections.
config/database.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 24
- Admin & member users → Laravel entry point: HTTP requests
- Laravel entry point → Web routes: boots and dispatches
- Web routes → Auth & role access: protected routes
- Auth & role access → Field administration: admin actions
- Auth & role access → Reservation operations: member and admin actions
- Field administration → Field model: field CRUD
- Field administration → Admin field & verification views: renders
- Reservation operations → Reservation validation: validates booking input
- Reservation validation → Reservation model: permits persistence
- Reservation operations → Field model: checks available fields
- Reservation operations → Reservation model: creates and manages
- Reservation operations → Member booking view: renders booking
- Reservation operations → Member reservation history: renders history
- Laravel entry point → API routes: API dispatch
- API routes → Field API: routes requests
- Field API → Field model: queries fields
- Field API → Field API representation: serializes
- Web routes → Reservation PDFs: report routes
- Reservation PDFs → Reservation model: loads reservations
- Reservation PDFs → Receipt template: renders receipt
- Field model → Application database: persists fields
- Reservation model → Application database: persists reservations
- Field schema → Application database: creates field table
- Reservation schema → Application database: creates reservation table