Php 如何解决此错误“找不到接口”Tymon\JWTAuth\Contracts\JWTSubject

Php 如何解决此错误“找不到接口”Tymon\JWTAuth\Contracts\JWTSubject,php,laravel,jwt-auth,Php,Laravel,Jwt Auth,我使用这个指南来制作jwt auth 当我尝试注册用户时,我发现了这个问题。 下面是composer.json中的require "require": { "php": ">=7.1.3", "fideloper/proxy": "~4.0", "laravel/framework": "5.5.*", "laravel/tinker": "~1.0", "tymon/jwt-auth": "1.0.0-r

我使用这个指南来制作jwt auth 当我尝试注册用户时,我发现了这个问题。 下面是composer.json中的require

  "require": {
        "php": ">=7.1.3",
        "fideloper/proxy": "~4.0",
        "laravel/framework": "5.5.*",
        "laravel/tinker": "~1.0",
        "tymon/jwt-auth": "1.0.0-rc.1"
    },
下面是user.php
namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Tymon\JWTAuth\Contracts\JWTSubject;

class User extends Authenticatable implements JWTSubject
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
    /**
     * Get the identifier that will be stored in the subject claim of the JWT.
     *
     * @return mixed
     */
    public function getJWTIdentifier()
    {
        return $this->getKey();
    }
    /**
     * Return a key value array, containing any custom claims to be added to the JWT.
     *
     * @return array
     */
    public function getJWTCustomClaims()
    {
        return [];
    }
}"

我认为您应该对此进行研究,使用以下依赖项更新composer.json:

"tymon/jwt-auth": "^1.0.0-beta.3@dev"

并运行composer update。

我认为您应该研究一下,使用以下依赖项更新composer.json:

"tymon/jwt-auth": "^1.0.0-beta.3@dev"

并运行composer update。

如果在命令行中运行composer show tymon/jwt auth,您会得到什么?以防万一,运行composer dump autoloadnothing:@IonMîndru您是否已修复此问题?如果在命令行中运行composer show tymon/jwt auth,您会得到什么?以防万一,运行composer dump autoloadnothing:@IonMîndru你修复了这个吗?