How gregoryusambarita-creator/uasgre0067 works
Purpose and entry points
This is a Laravel application for managing sports-field (“lapangan”) inventory and reservations (“reservasi”), including payment-proof upload and reservation reporting. HTTP enters through public/index.php, is bootstrapped by bootstrap/app.php, and is dispatched through routes/web.php for Blade pages or routes/api.php for programmatic clients.
Routing and delivery surfaces
The application exposes two delivery surfaces:
• Server-rendered browser workflows backed by app/Http/Controllers/LapanganController.php, app/Http/Controllers/ReservasiController.php, and app/Http/Controllers/LaporanController.php.
• API workflows backed by app/Http/Controllers/Api/AuthController.php and app/Http/Controllers/Api/LapanganController.php.
Web controllers render views under resources/views/lapangans, resources/views/reservasis, and resources/views/laporan; API responses are likely shaped through app/Http/Resources/LapanganResource.php.
Identity, authorization, and API access
Users are represented by app/Models/User.php. Browser authentication is handled by app/Http/Controllers/AuthController.php; API authentication has a separate controller at app/Http/Controllers/Api/AuthController.php. Role-based access is a distinct boundary enforced by app/Http/Middleware/CheckRole.php. Sanctum configuration and the personal-access-token migration indicate token-based API authentication: config/sanctum.php and database/migrations/2026_07_16_074008_create_personal_access_tokens_table.php.
Core domain and persistence
The principal domain records are fields and reservations, modeled in app/Models/Lapangan.php and app/Models/Reservasi.php. Their schema is owned by database/migrations/2026_07_16_074117_create_lapangans_table.php and database/migrations/2026_07_16_074117_create_reservasis_table.php. Controllers should be treated as the orchestration layer between authenticated requests, these Eloquent models, and rendered/API output.
Reservation workflow and evidence handling
Reservation creation and validation are separated from controller logic via app/Http/Requests/StoreReservasiRequest.php. Payment or reservation evidence is handled through the dedicated app/Http/Requests/UploadBuktiRequest.php and the reservation controller, with persistent file storage available under storage/app/public. The user-facing stages are represented by resources/views/reservasis/create.blade.php, resources/views/reservasis/upload-bukti.blade.php, and resources/views/reservasis/index.blade.php.
Field administration and reporting
Field CRUD is concentrated in app/Http/Controllers/LapanganController.php, with explicit create/update request contracts in app/Http/Requests/StoreLapanganRequest.php and app/Http/Requests/UpdateLapanganRequest.php. Reservation reporting is isolated in app/Http/Controllers/LaporanController.php, with a PDF-oriented report template at resources/views/laporan/reservasi-pdf.blade.php. This separates operational booking screens from export/report generation.
Runtime and infrastructure boundaries
The runtime is PHP/Laravel, managed through composer.json and the artisan CLI. Database, filesystem, session, cache, mail, logging, and queue adapters are environment-configurable through config/database.php, config/filesystems.php, config/queue.php, and related Laravel configuration. Front-end assets use Vite via vite.config.js, resources/js/app.js, and resources/css/app.css. No concrete external provider is identifiable from the supplied README; .env.example is the deployment-time boundary for service credentials and adapter selection.
Main entry points: ReservasiController.php Booking and admin controllers · web.php Web routes · app.php Application bootstrap · api.php API routes
Components 21
Laravel Runtime
- HTTP entry
public/index.php - Application bootstrap
bootstrap/app.php
Browser Surface
- Web routes
routes/web.php - Browser auth
app/Http/Controllers/AuthController.php - Booking and admin controllers · Handles fields, reservations, and reports.
app/Http/Controllers/ReservasiController.php - Blade workflows · Field, reservation, and report screens.
resources/views/reservasis/index.blade.php - Reservation PDF template
resources/views/laporan/reservasi-pdf.blade.php - Vite assets
resources/js/app.js
API Surface
- API routes
routes/api.php - API auth
app/Http/Controllers/Api/AuthController.php - Field API
app/Http/Controllers/Api/LapanganController.php - Field API resource
app/Http/Resources/LapanganResource.php - Sanctum tokens
config/sanctum.php
Reservation Domain
- Role guard · Enforces role-based access.
app/Http/Middleware/CheckRole.php - Reservation contracts · Validates booking creation and evidence upload.
app/Http/Requests/StoreReservasiRequest.php - Field CRUD contracts · Validates field create and update operations.
app/Http/Requests/StoreLapanganRequest.php - User
app/Models/User.php - Sports field
app/Models/Lapangan.php - Reservation · Stores bookings and payment evidence references.
app/Models/Reservasi.php - Application database · Schema includes users, fields, reservations, and API tokens.
config/database.php - Public file storage · Stores uploaded payment or reservation evidence.
storage/app/public
Connections 23
- HTTP entry → Application bootstrap: boots
- Application bootstrap → Web routes: loads
- Application bootstrap → API routes: loads
- Web routes → Browser auth: auth endpoints
- Web routes → Role guard: protected routes
- Web routes → Booking and admin controllers: dispatches
- Booking and admin controllers → Reservation contracts: validates reservations
- Booking and admin controllers → Field CRUD contracts: validates field CRUD
- Booking and admin controllers → Sports field: manages
- Booking and admin controllers → Reservation: manages
- Booking and admin controllers → Blade workflows: renders
- Booking and admin controllers → Reservation PDF template: renders export
- Booking and admin controllers → Public file storage: stores evidence
- API routes → API auth: auth endpoints
- API routes → Field API: dispatches
- API auth → Sanctum tokens: issues tokens
- Sanctum tokens → User: authenticates
- Field API → Sports field: queries fields
- Field API → Field API resource: formats responses
- User → Application database: persists
- Sports field → Application database: persists
- Reservation → Application database: persists
- Blade workflows → Vite assets: uses assets