public function actionIndex() { $post = new Post(); $category = new Category(); return $this->render('index', ['posts' => $post->getPosts(), 'categories' => $category->getCategories()]); }