|
@@ -3,6 +3,7 @@
|
|
|
namespace App\Exceptions;
|
|
|
|
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
+use Illuminate\Support\Facades\Http;
|
|
|
use Throwable;
|
|
|
|
|
|
class Handler extends ExceptionHandler
|
|
@@ -34,7 +35,20 @@ class Handler extends ExceptionHandler
|
|
|
public function register()
|
|
|
{
|
|
|
$this->reportable(function (Throwable $e) {
|
|
|
- //
|
|
|
+ try {
|
|
|
+
|
|
|
+ $url = config('stag.backendUrl') . '/dev/reportPhpError';
|
|
|
+ $headers['secret'] = 'superman';
|
|
|
+ Http::asForm()
|
|
|
+ ->withHeaders($headers)
|
|
|
+ ->post($url, [
|
|
|
+ 'data'=>'LHR: '.$e->getMessage(),
|
|
|
+ 'secret' => 'superman'
|
|
|
+ ])
|
|
|
+ ->json();
|
|
|
+ }catch(\Exception $e){
|
|
|
+ //do nothing
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|