'Eloquent in Laravel

i have a problem with this eloquent. how i can pass only the blog that have the attribute categoryid that same as the id that clicked from index.blade.php ?

This is the code of show function in CategoryController.php, the parameter is the id and comes from the index.blade.php

This is the picture of show.blade.php , the page after click button from index.blade.php



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source