Is this MVC violation?

I am creating an Instagram clone app. The image below is the view the shows the latest post of a user’s friends on his/her home page. The $friendPost variable is holding it which is originally from the controller counterpart. On line 22 to 29 checks whether the currently authenticated user has liked a post. $isliked variable contains a CSS fontawesome class far or fas, then on line 30 print the $isliked variable.
moreover, the last part of the view retrieves the comments from the current post.
My question is it is ok to put the logic in the view, i.e. retrieving the like and comments?

HI @deadstar1!

Welcome to the forum!

Screenshots are a little hard to read.

It would help the forum to better assist you if you could provide a link to the project or paste your code into the forum.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).