Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HasOne return type problem #28

Open
pitylee opened this issue Feb 25, 2021 · 0 comments
Open

HasOne return type problem #28

pitylee opened this issue Feb 25, 2021 · 0 comments

Comments

@pitylee
Copy link

pitylee commented Feb 25, 2021

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);
    }    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant