Working on a few changes.

This commit is contained in:
Taylor Otwell
2014-08-27 12:49:50 +02:00
parent fdba65c0dc
commit 78c932f688
6 changed files with 12 additions and 40 deletions

View File

@@ -1,17 +1,20 @@
<?php namespace App\Providers;
use App, Log;
use Exception;
use Illuminate\Contracts\Logging\Log;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Exception\Handler;
class ErrorServiceProvider extends ServiceProvider {
/**
* Register any error handlers.
*
* @param Handler $handler
* @param Log $log
* @return void
*/
public function boot()
public function boot(Handler $handler, Log $log)
{
// Here you may handle any errors that occur in your application, including
// logging them or displaying custom views for specific errors. You may
@@ -19,9 +22,9 @@ class ErrorServiceProvider extends ServiceProvider {
// exceptions. If nothing is returned, the default error view is
// shown, which includes a detailed stack trace during debug.
App::error(function(Exception $exception, $code)
$handler->error(function(Exception $e, $code) use ($log)
{
Log::error($exception);
$log->error($e);
});
}