how to get comments?
visherandro opened this issue · comments
How do i get comments of a model
Mybad.
$blog->comments()->paginate(20)
gives me comments for that blog
@visherandro Are you able to get the User info with the comment id?
$comments = $post->comments()->paginate(10);
This gives me the comments which I am able to show like this:
@foreach($comments as $comment)
Id: {{ $comment->id }} Comment: {{ $comment->comment }}
@endforech
But how to get the user attributes like user id, email, username etc with this?