withRouting( web: __DIR__.'/../routes/web.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { $middleware->validateCsrfTokens(except: [ '/7710672705:AAEX1RWhBoLA2L5EZuTLajQ---tRjahNr9w/Msg', ]); }) ->withExceptions(function (Exceptions $exceptions) { // })->create(); // ✅ 加在 create() 之后 $app->singleton( Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class ); return $app;