how to get specific records in many to many relationship in laravel 5.5 : Need Help I have three tables 1-posts 2-categories 3-category_post I did all the necessary things now the problem is here how can I get specific records in controller for example I want to retrieve all those posts which category is animal 

thanks in advance   