Hi
thanks for your great package. I recently update my packages and after that i got this exception when use JWTAuth::fromUser() ;
how can i fix this?
thanks.
| Q | A
| ----------------- | ---
| Bug? | yes
| New Feature? | no
| Framework | Laravel
| Framework version | 5.5
| Package version | 1.x.y
| PHP version | 7.2
use JWTAuth::fromUser()
make a token from a user model.
throw an exception Non-static method Tymon\JWTAuth\JWTAuth::fromUser() should not be called statically
its because of use wrong namespace Tymon\JWTAuth\JWTAuth instead of JWTAuth ;
You actually have to define the facade in app/config.php in order to use just JWTAuth;
so yeah, use JWTAuth; or alternatively : use Tymon\JWTAuth\Facades\JWTAuth;
Most helpful comment
its because of use wrong namespace Tymon\JWTAuth\JWTAuth instead of JWTAuth ;