changed anbu to load automatically at end of request- taylors idea
This commit is contained in:
parent
8d16ce8d81
commit
daea5fee2d
|
@ -3,6 +3,19 @@
|
||||||
return array(
|
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.
|
| Show the LOG tab.
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php Anbu::render(); ?>
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1>Welcome To Laravel</h1>
|
<h1>Welcome To Laravel</h1>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
use Laravel\View;
|
use Laravel\View;
|
||||||
use Laravel\File;
|
use Laravel\File;
|
||||||
use Laravel\Config;
|
use Laravel\Config;
|
||||||
|
use Laravel\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Anbu, the light weight profiler for Laravel.
|
* Anbu, the light weight profiler for Laravel.
|
||||||
|
@ -92,6 +93,14 @@ public static function register()
|
||||||
// modify them
|
// modify them
|
||||||
$listener = Config::get('anbu.event_listeners');
|
$listener = Config::get('anbu.event_listeners');
|
||||||
$listener();
|
$listener();
|
||||||
|
|
||||||
|
// echo anbu on laravel.done if enabled
|
||||||
|
if(Config::get('anbu.enable'))
|
||||||
|
{
|
||||||
|
Event::listen('laravel.done', function() {
|
||||||
|
Anbu::render();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue