Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bbmattieu9's avatar

Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found

I am following an API Authentication in Laravel-Vue SPA using Jwt-auth tutorial; When i did composer require tymon/jwt-auth all seem well but when I did php artisan jwt:generate I got an error. The error says ReflectionException : Method Tymon\JWTAuth\Commands\JWTGenerateCommand::handle() does not exist I have tried looking for solution online but i DO not understand where or what i did wrong. I also checked https://github.com/tymondesigns/jwt-auth/wiki/Installation

and followed the steps i found there. i edited my package.json file and added "require": { "tymon/jwt-auth": "0.5.*" } after which i ran composer update...still i got an error Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found

Please help me out with where I am wrong or what I am doing wrong. I am using laravel 5.6 with Vue2. Thanks in advance.

0 likes
2 replies
bbmattieu9's avatar

@rin4ik there is no Commands file in the src dir. Is there a way I can un-install JWT and start the installation afresh

Please or to participate in this conversation.