From 546b441b5db7eadf6c645caae5fc70296699f29e Mon Sep 17 00:00:00 2001 From: Peter Deed Date: Thu, 30 Jul 2015 19:47:52 +0100 Subject: [PATCH] Support get route in ajax controller action --- src/Reportico/Reportico/ReporticoServiceProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Reportico/Reportico/ReporticoServiceProvider.php b/src/Reportico/Reportico/ReporticoServiceProvider.php index a9bd4dd..efeeecc 100644 --- a/src/Reportico/Reportico/ReporticoServiceProvider.php +++ b/src/Reportico/Reportico/ReporticoServiceProvider.php @@ -46,6 +46,14 @@ public function register() return $this->app["view"]->make('reportico::reportico'); }); + $this->app["router"]->get("reportico/ajax", function() use ($app) + { + //return View::make('reportico::reportico'); + //$engine= App::make("getReporticoEngine"); + $engine = $app["app"]->make('getReporticoEngine'); + $engine->execute(); + }); + $this->app["router"]->post("reportico/ajax", function() use ($app) { //return View::make('reportico::reportico');