Open sayber opened 7 years ago
You need to
use JWTAuth;
instead of
use Tymon\JWTAuth\JWTAuth;
Because you have already added the JWTAuth
alias to 'app.php'.
Take a look at the creating tokens examples.
Oh, are you using 1.0.0-beta
or 0.5.11
?
0.5.11
This works, then embarrasses the code highlighting
@sayber this is solved?
i have same problem please help
me too for 0.5.*
We offten use this
use Tymon\JWTAuth\JWTAuth;
In fact, it use this one
use Tymon\JWTAuth\Facades\JWTAuth;
I have config this in App.php ['aliases'] So, we instead
use Tymon\JWTAuth\JWTAuth;
to
use JWTAuth;
me too for 1.0.0.* I have config this in APP.php ['aliases'] 'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class, So,i instead use Tymon\JWTAuth\JWTAuth; to use JWTAuth; but,it't not works!why?it tip me the JWTAuth is not defined
please instead config\jwt..php : 'jwt' => 'Tymon\JWTAuth\Providers\JWT\NamshiAdapter',
as 'jwt' => Tymon\JWTAuth\Providers\JWT\Namshi::class
, 'auth' => 'Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter'
as 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class
, 'storage' => 'Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter'
as 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class
Non-static method Tymon\JWTAuth\JWTAuth::attempt() should not be called statically
app.php
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,