LifeOnScreen / nova-google2fa

This package provides Google2FA support to Laravel Nova.
23 stars 56 forks source link

HasOne return type problem #28

Open pitylee opened 3 years ago

pitylee commented 3 years ago

Hi there.

As a temporary solution, I removed the return type of the User->user2fa method like below.

Yet, this needs clarifying, which HasOne should it be, because it tried the Eloquent HasOne, and App namespace has no HasOne.

Temporary solution:

    /**
     * @return HasOne
     */
    public function user2fa(): BelongsToOne
    {
        return $this->hasOne(User2fa::class);
    }    

to

    public function user2fa()
    {
        return $this->hasOne(User2fa::class);
    }