- ProgramController: full CRUD, publish, close, delete (guarded if attendance exists) - StoreProgramRequest + UpdateProgramRequest with Malay attribute names - AuditLogService: logs admin actions, redacts sensitive fields (no_kp, token, password) - Program index: search, status filter, pagination (Bootstrap 5) - Program create/edit: shared _form partial with all fields (dates, sessions, walk-in toggle) - Program show: tab layout (participants, qr, template, questionnaire, statistics) - Bootstrap 5 pagination via Paginator::useBootstrapFive() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
903 B
PHP
36 lines
903 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void {}
|
|
|
|
public function boot(): void
|
|
{
|
|
// Bootstrap pagination
|
|
Paginator::useBootstrapFive();
|
|
|
|
// Rate limiters for public routes
|
|
RateLimiter::for('checkin', fn(Request $request) =>
|
|
Limit::perMinute(60)->by($request->ip())
|
|
);
|
|
|
|
RateLimiter::for('certificate', fn(Request $request) =>
|
|
Limit::perMinute(30)->by($request->ip())
|
|
);
|
|
|
|
// Force HTTPS in production
|
|
if (app()->environment('production')) {
|
|
URL::forceScheme('https');
|
|
}
|
|
}
|
|
}
|