/** * Create a new HTTP kernel instance. * * @param \Illuminate\Contracts\Foundation\Application $app * @param \Illuminate\Routing\Router $router * * @return void */ public function __construct(Application $app, Router $router) { $router->middleware('context', \KodiCMS\CMS\Http\Middleware\Context::class); $this->middlewareGroups['backend'] = [\App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \KodiCMS\CMS\Http\Middleware\VerifyCsrfToken::class, \KodiCMS\CMS\Http\Middleware\PostJson::class, 'backend.auth', 'context:' . CMS::CONTEXT_BACKEND]; parent::__construct($app, $router); }
/** * Create a new Kernel instance. * * @param Application $app * @param Router $router */ public function __construct(Application $app, Router $router) { $this->defineLocale(); parent::__construct($app, $router); }
<?php $loader = (require '../vendor/autoload.php'); $loader->register(); use App\Extensions\ControllerResolver; use App\Http\Kernel; use Symfony\Component\HttpFoundation\Request; $request = Request::createFromGlobals(); $resolver = new ControllerResolver(); $kernel = new Kernel($resolver); $response = $kernel->handle($request); $response->send();