Skip to content

HasOne return type problem #28

@pitylee

Description

@pitylee

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);
    }    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions