public function registerKernel()
    {
        $this->app->singleton('kernel.web', function ($app) {
            $web = new \Nano7\Http\Kernel($app);

            // Carregar grupo de middlewares
            $web->middlewareGroup('web', []);

            $web->middlewareGroup('api', [
                'session.api',
            ]);

            // Carregar middlewares padroes
            $web->middleware('session.api',       '\Nano7\Http\Middlewares\StartApi');
            $web->middleware('session.start',     '\Nano7\Http\Middlewares\StartSession');
            $web->middleware('cookie.add.queued', '\Nano7\Http\Middlewares\AddQueuedCookies');

            // Executar evento para registro dos middlewares
            event()->fire('web.middleware.register', [$web]);

            // Carregar middlewares
            $middleware_file = app_path('middlewares.php');
            if (file_exists($middleware_file)) {
                require $middleware_file;
            }

            return $web;
        });
    }