This commit is contained in:
Taylor Otwell
2012-04-03 16:53:15 -05:00
parent daea5fee2d
commit 1ca7d799af
11 changed files with 191 additions and 277 deletions

View File

@@ -1,72 +0,0 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Enable Anbu
|--------------------------------------------------------------------------
|
| This will cause anbu to be rendered on every request, if you would prefer
| to enable anbu in your templates manually, simply add Anbu::render();
| after the <body> tag.
|
*/
'enable' => true,
/*
|--------------------------------------------------------------------------
| Show the LOG tab.
|--------------------------------------------------------------------------
|
| Display a tog showing all entries made using the Laravel Log class.
|
*/
'tab_logs' => 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');
},
);

View File

@@ -38,14 +38,24 @@ return array(
| remain secret and should not be shared with anyone. Make it about 32
| characters of random gibberish.
|
| The "auto_key" option tells Laravel to automatically set this key value
| if one has not already been set. This is generally done on the first
| request to the Laravel splash screen.
|
*/
'key' => 'YourSecretKeyGoesHere!',
/*
|--------------------------------------------------------------------------
| Profiler Toolbar
|--------------------------------------------------------------------------
|
| Laravel includes a beautiful profiler toolbar that gives you a heads
| up display of the queries and logs performed by your application.
| This is wonderful for development, but, of course, you should
| disable the toolbar for production applications..
|
*/
'profiler' => true,
/*
|--------------------------------------------------------------------------
| Application Character Encoding
@@ -116,7 +126,6 @@ return array(
*/
'aliases' => array(
'Anbu' => 'Laravel\\Anbu\\Anbu',
'Auth' => 'Laravel\\Auth',
'Asset' => 'Laravel\\Asset',
'Autoloader' => 'Laravel\\Autoloader',
@@ -141,6 +150,7 @@ return array(
'Log' => 'Laravel\\Log',
'Memcached' => 'Laravel\\Memcached',
'Paginator' => 'Laravel\\Paginator',
'Profiler' => 'Laravel\\Profiling\\Profiler',
'URL' => 'Laravel\\URL',
'Redirect' => 'Laravel\\Redirect',
'Redis' => 'Laravel\\Redis',

View File

@@ -35,6 +35,12 @@
Route::get('/', function()
{
Config::set('database.connections.mysql.password', 'password');
Config::set('database.connections.mysql.database', 'bundler');
DB::table('users')->get();
DB::table('users')->where_id(1)->first();
DB::table('users')->where_in('id', array(1, 2, 3))->get();
Log::error('Something went wrong!');
return View::make('home.index');
});

View File

@@ -125,20 +125,6 @@ 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 <body>
| tag of your main template, or page.
|
*/
Anbu::register();
/*
|--------------------------------------------------------------------------
| Set The Default Timezone