I'm trying to display a hasmany relation in my component.
My query like:
public function onRender(){
$blogs = BlogPost::where('published', 1)
->where('published_at', 'orderBy($this->property('sortOrderBy'), $this->property('sortOrder'))
->with('tags')
->paginate($this->property('postsPerPage'));
$this->blogs = $blogs;
}
In the html of the component i have a for loop what goes well. Only the tags are a problem. When i set {{ post.tags }} i get a json output. Is this normal or do i something wrong ?
Last updated