How to get related post from blog by category id



  • How to get related post from blog by category id



  • private $category;
    private $setting;

    public function __construct(CategoryRepository $category, Setting $setting)
    {
        $this->category = $category;
        $this->setting = $setting;
    }
    

    $paginate = $this->setting->get('blog::posts-per-page', locale());
    $posts = $this->category->find($categoryId)->posts()->paginate($paginate);



  • In case if you face any difficulty while getting the recover or reset Gmail account password, then Gmail can offer you the fastest way to clear all your confusion. Here Gmail agents working 24/7 to provide a maximum solution for resolving all sorts of Gmail mail issues. You can chat online with experts by Gmail chat and get a solution for all your Gmail not working.


Log in to reply
 

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.