withRouting( web: __DIR__.'/../routes/web.php', api: __DIR__.'/../routes/api.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // Trust all proxies when behind load balancers like Railway $middleware->trustProxies(at: '*'); // Daftarkan alias middleware Anda di sini $middleware->alias([ 'owner' => \App\Http\Middleware\OnlyOwner::class, 'prevent-back-history' => \App\Http\Middleware\PreventBackHistory::class, ]); }) ->withExceptions(function (Exceptions $exceptions) { // })->create();