Use facades.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php namespace App\Providers;
|
||||
|
||||
use App, Log;
|
||||
use Exception;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ErrorServiceProvider extends ServiceProvider {
|
||||
@@ -17,9 +19,9 @@ class ErrorServiceProvider extends ServiceProvider {
|
||||
// exceptions. If nothing is returned, the default error view is
|
||||
// shown, which includes a detailed stack trace during debug.
|
||||
|
||||
$this->app->error(function(\Exception $exception, $code)
|
||||
App::error(function(Exception $exception, $code)
|
||||
{
|
||||
$this->app['log']->error($exception);
|
||||
Log::error($exception);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user