kadevjo / fibonacci
Extension Voyager Library
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ^6.3
- illuminate/support: 4.*|5.*
- kreait/firebase-php: ^4.0
- spatie/laravel-analytics: ^3.3
- spatie/url: ^1.3
- tcg/voyager: 1.1.11
- tymon/jwt-auth: 1.0.0-rc.2
This package is auto-updated.
Last update: 2026-06-08 13:28:14 UTC
README
Vendor fibonacci
To use the middlewares you will have to register them in app/Http/Kernel.php under the $routeMiddleware property:
protected $routeMiddleware = [ ... 'jwt.auth' => 'Tymon\JWTAuth\Middleware\GetUserFromToken', 'jwt.refresh' => 'Tymon\JWTAuth\Middleware\RefreshToken', ];
Add the following code to the render method within app/Exceptions/Handler.php
if ($exception instanceof Tymon\JWTAuth\Exceptions\TokenExpiredException) { return response()->json(['error'=>'token_expired'], $exception->getStatusCode()); } else if ($exception instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) { return response()->json(['token_invalid'], $exception->getStatusCode()); } else if($exception instanceof \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException ){ return response()->json(['error'=>'token_not_found'], $exception->getStatusCode()); } }