henryoladj
5 months ago
737
25
Laravel

Displaying Posts from different Categories(I am getting error) (@foreach($posts as $post))

Posted 5 months ago by henryoladj

I have this code on my homepage

@foreach($posts as $post)
{{$post->subject}}
@endforeach

Which displays all the latest posts, but i want to display posts from video(Category) alone on the sidebar and i do not know how to go with this.

How do i look each category alone and display each posts associated with them on the sidebar.

Please sign in or create an account to participate in this conversation.