我遇到错误 Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' 未找到

I'm getting error Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found

我正在安装 jwt-auth package.I 运行 这个命令

composer require tymon/jwt-auth

有composer.json个文件

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "^6.2",
        "laravel/tinker": "^2.0",
        "tymon/jwt-auth": "^1.0"
    },

还有app.php个文件

  'providers' => [
              ........
        Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,

    ],
   'aliases' => [
              ........
        'JWTAuth' =>Tymon\JWTAuth\Facades\JWTAuth::class,
        'JWTFactory' => Tymon\JWTAuth\Facades\JWTFactory::class,
    ],

我什么时候运行这个命令。

php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"

获取错误。

In ProviderRepository.php line 208:

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

您可能正在阅读旧文档或观看旧版本的一些教程视频。

应该是:

php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

文档:https://jwt-auth.readthedocs.io/en/develop/laravel-installation/