Event::listen not catching laravel.query -
i pretty new laravel. working on rest api , trying @ queries being generated models. in routes have route group set up.
route::(["before" => "auth", function() { route::model("juror_subject", "jurorsubject"); route::get("juror_subject", [ "as" => "juror_subject/index" "uses" => "jurorsubjectcontroller@index" ]); });
i wanted see query being run. watching video jeffrey way , mentions can use event::listen see query so.
in routes:
event::listen('laravel.query', function($sql){ var_dump($sql); });
however, when load url:
localhost:8080/api/juror_subject
it returns json response , never seems fire laravel.query event.
am missing element needed event listeners work properly? type of routing using not firing query? if so, how go dumping queries using route group?
laravel.query
laravel 3 , use illuminate.query
instead, check answer more details. moreover, call db::getquerylog()
ran queries ( no need listener), or use this package pretty neat.
Comments
Post a Comment