Class Tymon\\JWTAuth\\middleware\\GetUserFromToken does not exist

Kernel.php文件
protected $routeMiddleware = [
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'jwt.auth' => \Tymon\JWTAuth\middleware\GetUserFromToken::class,
    'jwt.refresh' => \Tymon\JWTAuth\middleware\RefreshToken::class,
];

routes.php文件

   
   $api->group(['middleware' => 'jwt.auth'], function($api) {
        $api->get('lessons', 'LessonsController@index');
        $api->get('lessons/{id}', 'LessonsController@show');
    });
    

config/app.php文件


Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
...
'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,

已经执行了如下命令
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"
php artisan jwt:generate
composer dump-autoload

可还是提示
Class Tymon\\JWTAuth\\middleware\\GetUserFromToken does not exist

stackoverflow给出的解决方法也是如上几种,求大神帮忙解决。我在本地是正常的 我把本地代码push到coding上之后,在服务器上git clone 就一直提示这个错误消息。

使用大写试试?

'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
JellyBool
修改的评论也不能少于六个字哦!
NorthWish
修改的评论也不能少于六个字哦!
JellyBool
修改的评论也不能少于六个字哦!