Add (jsonld)

This commit is contained in:
2023-09-26 00:09:51 +08:00
parent 2c12b8857d
commit 8da977daeb
23 changed files with 238 additions and 85 deletions

View File

@@ -2,10 +2,9 @@
namespace App\Exceptions;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Http\Request;
use Throwable;
class Handler extends ExceptionHandler
@@ -36,7 +35,7 @@ public function register()
$this->renderable(function (NotFoundHttpException $e, $request) {
if ($request->is('api/*')) {
return response()->json([
'status' => -1
'status' => -1,
], 404);
}
});
@@ -52,21 +51,15 @@ public function register()
public function render($request, Throwable $exception)
{
if ($exception instanceof NotFoundHttpException)
{
if ($exception instanceof NotFoundHttpException) {
}
else if ($exception instanceof AuthenticationException)
{
} elseif ($exception instanceof AuthenticationException) {
}
else
{
} else {
inspector()->reportException($exception);
}
}
//default laravel response
return parent::render($request, $exception);
}
}