feat: upgrade laravel version from 6 to 7

This commit is contained in:
amir-ys
2024-11-05 00:30:01 +03:30
parent 1b45e40d27
commit a5bc493fd8
3 changed files with 1202 additions and 1119 deletions
+15 -11
View File
@@ -2,8 +2,10 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Throwable;
class Handler extends ExceptionHandler
{
@@ -29,27 +31,29 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param \Exception $exception
* @param Throwable $throwable
* @return void
* @throws Throwable
*/
public function report(Exception $exception)
public function report(Throwable $throwable)
{
if (app()->bound('sentry') && $this->shouldReport($exception)) {
app('sentry')->captureException($exception);
if (app()->bound('sentry') && $this->shouldReport($throwable)) {
app('sentry')->captureException($throwable);
}
parent::report($exception);
parent::report($throwable);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
* @param Request $request
* @param Throwable $throwable
* @return Response
* @throws Throwable
*/
public function render($request, Exception $exception)
public function render($request, Throwable $throwable): Response
{
return parent::render($request, $exception);
return parent::render($request, $throwable);
}
}