complete story 8.10 with qa test
This commit is contained in:
+8
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Services\AdminNotificationService;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Foundation\Configuration\Exceptions;
|
||||
use Illuminate\Foundation\Configuration\Middleware;
|
||||
@@ -22,5 +23,11 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
]);
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions): void {
|
||||
//
|
||||
$exceptions->reportable(function (Throwable $e) {
|
||||
$service = app(AdminNotificationService::class);
|
||||
|
||||
if ($service->shouldNotifyAdmin($e)) {
|
||||
$service->notifyError($e);
|
||||
}
|
||||
});
|
||||
})->create();
|
||||
|
||||
Reference in New Issue
Block a user