Deploy Ladill Queue / deploy (push) Successful in 56s
Phases 1–6: tickets, counters, displays, appointments, workflows, rules, analytics, reports, feedback, admin, device API, and Gitea deploy workflow for queue.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
943 B
PHP
36 lines
943 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\ServiceEventOccurred;
|
|
use App\Listeners\PlatformServiceEventListener;
|
|
use Illuminate\Cache\RateLimiting\Limit;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Event;
|
|
use Illuminate\Support\Facades\RateLimiter;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function boot(): void
|
|
{
|
|
Event::listen(ServiceEventOccurred::class, PlatformServiceEventListener::class);
|
|
|
|
RateLimiter::for('kiosk-device', function (Request $request) {
|
|
$key = $request->route('token') ?? $request->ip();
|
|
|
|
return Limit::perMinute(30)->by((string) $key);
|
|
});
|
|
|
|
View::composer(['partials.topbar'], function ($view) {
|
|
$view->with(\App\Support\MobileTopbar::resolve());
|
|
});
|
|
}
|
|
}
|