app->router->group([ // 'middleware' => 'rpc', ], function () { $callback = function () { $server = new JsonRpcServer(); return $server->handler(); }; $this->app->router->post('rpc/gateway.json', $callback); $this->app->router->get('rpc/gateway.json', $callback); $this->app->router->get('rpc/doc.html', function () { $doc = new JsonRpcDoc(base_path('app/Rpc/')); return $doc->render(); }); }); } /** * Register any application services. * * @return void */ public function register() { } }