laravel 5.3
app.config
Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class
composer.json
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"tymon/jwt-auth": "0.5.*"
},
The documentation doesn't include the preceding slash on the middleware declarations:
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
Had the same problem in Laravel 5.3 until I added that backslash
@Migweld Thanks. That fixed my problem. You should submit PR to Wiki.
Also, anything to read it about that. My skills are limited using classes in PHP.
@Migweld , i seem to be missing something really silly here. Where is the middleware declaration?
I don't see any such thing on the wiki - https://github.com/tymondesigns/jwt-auth/wiki/Installation
@prateekvarma It should be under app/Http/Kernel.php, although I must admit I've switched over to Dingo in my project and can't seem to find the commit wherin I was using JWT to confirm :grimacing:
Most helpful comment
The documentation doesn't include the preceding slash on the middleware declarations:
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,Had the same problem in Laravel 5.3 until I added that backslash