register('Flarum\Admin\AdminServiceProvider'); $admin = new MiddlewarePipe(); $admin->pipe($app->make('Flarum\Admin\Middleware\LoginWithCookieAndCheckAdmin')); $admin->pipe('/admin.php', $app->make('Flarum\Http\RouterMiddleware', ['routes' => $app->make('flarum.admin.routes')])); $admin->pipe(new \Franzl\Middleware\Whoops\Middleware()); $server = Server::createServer( $admin, $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES ); $server->listen();