diff --git a/application/config/anbu.php b/application/config/anbu.php new file mode 100644 index 00000000..9b6503ee --- /dev/null +++ b/application/config/anbu.php @@ -0,0 +1,59 @@ + true, + + /* + |-------------------------------------------------------------------------- + | Show the QUERIES tab. + |-------------------------------------------------------------------------- + | + | Display a tab showing all queries performed by the Database layer. + | + */ + + 'tab_queries' => true, + + /* + |-------------------------------------------------------------------------- + | Include jQuery? + |-------------------------------------------------------------------------- + | + | Anbu needs the jQuery JavaScript framework to function, if you are already + | using jQuery in your templates, set this value to false. + | + */ + + 'include_jquery' => true, + + /* + |-------------------------------------------------------------------------- + | Event Listeners + |-------------------------------------------------------------------------- + | + | These are the Laravel event listeners, feel free to modify them to use + | a different data source, or include more if necessary. + | + */ + + 'event_listeners' => function() + { + // pass laravel log entries to anbu + Event::listen('laravel.log', 'Anbu::log'); + + // pass executed SQL queries to anbu + Event::listen('laravel.query', 'Anbu::sql'); + }, + +); diff --git a/application/start.php b/application/start.php old mode 100644 new mode 100755 index 085dd090..a6fd4f70 --- a/application/start.php +++ b/application/start.php @@ -125,6 +125,20 @@ Event::listen(Lang::loader, function($bundle, $language, $file) Blade::sharpen(); +/* +|-------------------------------------------------------------------------- +| Enable The Anbu Profiler +|-------------------------------------------------------------------------- +| +| The Anbu profiler is an easy way to view all of your Executed SQL +| queries, log entries and other useful data from the front-end of your +| web app, to enable output simply add Anbu::render(); after the
+| tag of your main template, or page. +| +*/ + +Anbu::register(); + /* |-------------------------------------------------------------------------- | Set The Default Timezone @@ -154,4 +168,4 @@ date_default_timezone_set(Config::get('application.timezone')); if ( ! Request::cli() and Config::get('session.driver') !== '') { Session::load(); -} \ No newline at end of file +} diff --git a/application/views/home/index.php b/application/views/home/index.php old mode 100644 new mode 100755 index 156c36ab..980248f3 --- a/application/views/home/index.php +++ b/application/views/home/index.php @@ -88,6 +88,7 @@ +