public function post_month($year, $month) { // возвращаем посты за month # обращаемся к моделе Category $Categories = new Categories(); $categories = $Categories->cats_for_header(); # обращаемся к моделе Page $pages = new Page(); $footer_pages = $pages->footer_pages(); $Posts_model = new Posts(); $posts = $Posts_model->post_of_month($year, $month); return view('layouts.default', ['categories' => $categories, 'pages' => $footer_pages, 'content_layout' => 'posts_content', 'posts' => $posts]); }