How oktaviasiahaan443-art/uasprakpwebvia works
Purpose and Runtime
This is a Laravel PHP application for managing sports-field (Lapangan) reservations (Reservasi). It provides separate member and admin experiences: members create and review bookings; admins manage fields, verify reservations, and produce PDF receipts/reports. Laravel is served through public/index.php, bootstrapped by bootstrap/app.php, with CLI operations via artisan.
HTTP Entry Points and Routing
Browser routes are defined in routes/web.php; API routes and their controller boundary are in routes/api.php and app/Http/Controllers/ApiController.php. Requests enter Laravel middleware, route to controllers, validate through Form Requests, then render Blade pages or API resources. The repository also has the standard authentication route/controller flow under app/Http/Controllers/Auth.
Identity, Authentication, and Authorization
User is the principal identity model, backed by the users migration and Laravel authentication configuration:
• app/Models/User.php
• database/migrations/0001_01_01_000000_create_users_table.php
• config/auth.php
Authentication includes registration, login, password reset, email verification, and password confirmation through app/Http/Controllers/Auth/RegisteredUserController.php and app/Http/Controllers/Auth/AuthenticatedSessionController.php. Role-based access is an explicit application boundary implemented in app/Http/Middleware/RoleMiddleware.php, separating admin operations from member workflows.
Core Domain and Persistence
The central relational domain is fields and their reservations:
• app/Models/Lapangan.php
• app/Models/Reservasi.php
• database/migrations/2026_07_16_070628_create_lapangans_table.php
• database/migrations/2026_07_16_070634_create_reservasis_table.php
Controllers own domain-facing HTTP actions: app/Http/Controllers/LapanganController.php handles field administration, while app/Http/Controllers/ReservasiController.php handles booking creation, history, and administrative verification. Seeders provide initial users and fields through database/seeders/UserSeeder.php and database/seeders/LapanganSeeder.php.
Reservation and Validation Flow
A member request reaches reservation routes, is validated by app/Http/Requests/ReservasiRequest.php, persisted through Reservasi, and rendered to member reservation views such as resources/views/member/reservasi/create.blade.php and resources/views/member/reservasi/history.blade.php. Admins review and verify bookings through the same controller/domain boundary and resources/views/admin/reservasi/verifikasi.blade.php. Field create/update input is independently constrained by app/Http/Requests/LapanganRequest.php and app/Http/Requests/UpdateLapanganRequest.php.
Presentation and Document Output
The primary UI is server-rendered Blade, organized by role:
• resources/views/admin/dashboard.blade.php
• resources/views/member/dashboard.blade.php
• resources/views/layouts/app.blade.php
app/Http/Controllers/PdfController.php is the document-generation boundary, with receipt and reporting templates at resources/views/admin/pdf/kwitansi.blade.php and resources/views/admin/pdf/laporan.blade.php. The exact PDF library/service is not identifiable from the supplied tree.
Infrastructure Boundaries
Persistence, sessions, cache, mail, queues, filesystems, and logging are Laravel-configurable infrastructure concerns under config/database.php, config/session.php, config/mail.php, config/queue.php, and config/filesystems.php. Database migrations include cache and job tables, so database-backed cache/queue operation is supported by schema. Frontend assets are built with Vite from resources/js/app.js and resources/css/app.css; application-generated files use Laravel storage paths under storage/app.
Main entry points: web.php Web routes · ReservasiController.php Reservation controller · Reservasi.php Reservasi · app.php Application bootstrap
Components 21
Laravel Runtime
- Web entry point
public/index.php - Application bootstrap
bootstrap/app.php - CLI entry point
artisan
HTTP & Access
- Web routes
routes/web.php - API routes
routes/api.php - Authentication flow · Registration and session authentication endpoints.
app/Http/Controllers/Auth/AuthenticatedSessionController.php - Role authorization · Separates admin operations from member workflows.
app/Http/Middleware/RoleMiddleware.php - API controller
app/Http/Controllers/ApiController.php
Reservation Domain
- Reservation controller · Handles member bookings, history, and admin verification.
app/Http/Controllers/ReservasiController.php - Field controller
app/Http/Controllers/LapanganController.php - Reservation validation
app/Http/Requests/ReservasiRequest.php - Field validation · Validates field create and update input.
app/Http/Requests/LapanganRequest.php - Reservasi
app/Models/Reservasi.php - Lapangan
app/Models/Lapangan.php
Presentation & Output
- Role-based Blade UI · Member and admin dashboards and reservation pages.
resources/views/layouts/app.blade.php - PDF generation · Produces receipts and reservation reports.
app/Http/Controllers/PdfController.php - PDF templates
resources/views/admin/pdf/kwitansi.blade.php - Vite assets
resources/js/app.js
Data & Infrastructure
- User
app/Models/User.php - Relational database · Users, fields, reservations, cache, and jobs are schema-backed.
database/migrations/2026_07_16_070634_create_reservasis_table.php - Initial data seeders · Seeds users and fields.
database/seeders/UserSeeder.php
Connections 26
- Web entry point → Application bootstrap: boots
- CLI entry point → Application bootstrap: boots
- Application bootstrap → Web routes: serves
- Application bootstrap → API routes: serves
- Web routes → Authentication flow: auth endpoints
- Web routes → Role authorization: protects routes with
- Web routes → Reservation controller: booking routes
- Web routes → Field controller: field routes
- API routes → API controller: dispatches
- Authentication flow → User: authenticates
- Role authorization → Reservation controller: gates admin actions
- Reservation controller → Reservation validation: validates input
- Reservation controller → Reservasi: creates and verifies
- Reservation controller → Role-based Blade UI: renders
- Field controller → Field validation: validates input
- Field controller → Lapangan: manages
- Reservasi → Lapangan: belongs to
- Reservasi → User: belongs to
- User → Relational database: persists
- Lapangan → Relational database: persists
- Reservasi → Relational database: persists
- Initial data seeders → User: seeds
- Initial data seeders → Lapangan: seeds
- PDF generation → Reservasi: uses booking data
- PDF generation → PDF templates: renders
- Role-based Blade UI → Vite assets: loads built assets