Working on a few changes.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user