I am working with Laravel 5.5 and I am attempting to extract the comments object
The comments display properly in the console,
when using this code snippet:
<% post.comments.comment_body%>
No content is returned
but when I use:
<% post.comments%>
An array of objects related to the comment is shown. However, I am encountering difficulties retrieving specific information.
This is what my code looks like:
Post Controller
public function getPosts()
{
// Code logic here
}
main.js
// JavaScript logic here
HTML Template
<!-- HTML template markup -->