Skip to content

Error in code #247

@mgrechanik

Description

@mgrechanik

Hello.
In App\Models\Tag::articles
you have it wrong:

return $this->belongsToMany('App\Models\Article', 'articles_tags', 'article_id', 'tag_id');

you need to write:

return $this->belongsToMany('App\Models\Article', 'articles_tags', 'tag_id', 'article_id');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions