How warblus75-lgtm/sistemreservasilapanganfutsal works
Purpose and Entry Points
This is a Laravel application for managing sports-field (lapangan) inventory and reservation (reservasi) workflows, including payment-proof upload and reservation reporting. HTTP traffic enters through public/index.php, boots via bootstrap/app.php, and is dispatched by routes/web.php for Blade UI and routes/api.php for programmatic access.
Web and API Delivery
The browser-facing application uses MVC controllers and Blade templates:
• Field management: app/Http/Controllers/LapanganController.php, resources/views/lapangans/index.blade.php
• Reservation workflow: app/Http/Controllers/ReservasiController.php, resources/views/reservasis/create.blade.php
• Authentication and reports: app/Http/Controllers/AuthController.php, app/Http/Controllers/LaporanController.php, resources/views/laporan/reservasi-pdf.blade.php
A parallel API exposes authentication and field operations through app/Http/Controllers/Api/AuthController.php and app/Http/Controllers/Api/LapanganController.php. API response shaping is centralized for fields in app/Http/Resources/LapanganResource.php.
Domain and Persistence Boundary
The core persisted domain consists of users, fields, and reservations:
• app/Models/User.php
• app/Models/Lapangan.php
• app/Models/Reservasi.php
Schema ownership is explicit in database/migrations/0001_01_01_000000_create_users_table.php, database/migrations/2026_07_16_074117_create_lapangans_table.php, and database/migrations/2026_07_16_074117_create_reservasis_table.php. Controllers should use these Eloquent models as the boundary to the configured database; database connection behavior is supplied by config/database.php.
Reservation and Payment-Proof Flow
A reservation is created through the reservation controller, with input validation isolated in app/Http/Requests/StoreReservasiRequest.php. Payment evidence is a distinct stage, validated by app/Http/Requests/UploadBuktiRequest.php and presented through resources/views/reservasis/upload-bukti.blade.php. Uploaded artifacts belong on Laravel-managed storage under storage/app, with disk/publication behavior controlled by config/filesystems.php.
Access Control and Identity
There are two authentication surfaces: session-oriented web authentication and token-oriented API authentication. Authorization includes a role gate in app/Http/Middleware/CheckRole.php. Laravel auth configuration resides in config/auth.php; Sanctum configuration and its personal-access-token migration indicate token support for the API: config/sanctum.php and database/migrations/2026_07_16_074008_create_personal_access_tokens_table.php.
Reporting and Operational Infrastructure
app/Http/Controllers/LaporanController.php owns reservation reporting, with a dedicated report/PDF-oriented Blade view at resources/views/laporan/reservasi-pdf.blade.php. Laravel runtime capabilities are configured conventionally for cache, queues, logging, mail, and sessions in config/cache.php, config/queue.php, config/logging.php, config/mail.php, and config/session.php. Front-end assets are built through Vite from resources/js/app.js and resources/css/app.css; this is a server-rendered Laravel application rather than a standalone SPA.
Main entry points: ReservasiController.php Web Controllers · web.php Web Routes · database.php Configured Database · app.php Application Bootstrap
Components 22
HTTP Delivery
- Public Entry
public/index.php - Application Bootstrap
bootstrap/app.php - Web Routes · Dispatches server-rendered browser workflows.
routes/web.php - API Routes
routes/api.php
Application Workflows
- Web Controllers · Handles field, reservation, and session-auth UI actions.
app/Http/Controllers/ReservasiController.php - Blade UI · Renders field management and reservation screens.
resources/views/reservasis/create.blade.php - Reservation Validation
app/Http/Requests/StoreReservasiRequest.php - Proof Upload Validation
app/Http/Requests/UploadBuktiRequest.php - Proof Upload UI
resources/views/reservasis/upload-bukti.blade.php - Reservation Reports · Produces reservation report/PDF output.
app/Http/Controllers/LaporanController.php - API Controllers · Exposes authentication and field operations.
app/Http/Controllers/Api/LapanganController.php - Field API Resource · Shapes field responses.
app/Http/Resources/LapanganResource.php - Role Gate
app/Http/Middleware/CheckRole.php
Domain & Persistence
- Users
app/Models/User.php - Sports Fields
app/Models/Lapangan.php - Reservations
app/Models/Reservasi.php - Database Schema · Owns user, field, reservation, and token tables.
database/migrations/2026_07_16_074117_create_reservasis_table.php
Platform Services
- Configured Database
config/database.php - Authentication · Supports web sessions and API tokens.
config/auth.php - Managed File Storage · Stores uploaded payment evidence under storage/app.
storage/app - Filesystem Configuration
config/filesystems.php - Vite Assets · Builds CSS and JavaScript for Blade pages.
resources/js/app.js
Connections 27
- Public Entry → Application Bootstrap: boots
- Application Bootstrap → Web Routes: loads
- Application Bootstrap → API Routes: loads
- Web Routes → Role Gate: protects routes with
- Web Routes → Web Controllers: dispatches
- Web Routes → Reservation Reports: dispatches
- API Routes → Role Gate: protects routes with
- API Routes → API Controllers: dispatches
- Web Controllers → Reservation Validation: validates creation
- Web Controllers → Proof Upload Validation: validates upload
- Web Controllers → Blade UI: renders
- Web Controllers → Proof Upload UI: renders
- Web Controllers → Sports Fields: manages
- Web Controllers → Reservations: creates and updates
- Proof Upload Validation → Managed File Storage: accepts evidence for
- Reservation Reports → Reservations: queries
- Reservation Reports → Blade UI: renders PDF view
- API Controllers → Field API Resource: formats responses with
- API Controllers → Sports Fields: operates on
- Role Gate → Authentication: uses identity
- Authentication → Users: authenticates
- Users → Configured Database: persists through
- Sports Fields → Configured Database: persists through
- Reservations → Configured Database: persists through
- Database Schema → Configured Database: defines
- Filesystem Configuration → Managed File Storage: configures disks for
- Vite Assets → Blade UI: supplies client assets