laravelista / comments

Native comments for your Laravel application.
MIT License
745 stars 144 forks source link

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'comments.article_id' in 'where clause' (SQL: select * from `comments` where `comments`.`article_id` = 1 and `comments`.`article_id` is not null and `parent_id` is null) (View: /var/www/html/resources/views/vendor/comments/components/comments.blade.php) #144

Closed EricTalv closed 3 years ago

EricTalv commented 3 years ago

My ArticleController:

public function show(Article $article)
    {
        return view('articles.show', [
            'article' => $article
        ]);
    }

I did all the pre-requisits but I can't seem to get pass this one error, any help?

EricTalv commented 3 years ago

Nevermind, it seems I was supposed to give the Users model instead of the Article model

@comments(['model' => $article->user])