/** * view recipe * @param null $one */ public function getRecipe($one = null) { // アクセス保存 $this->analytics->setCount($one); // recipe取得 $recipe = $this->recipe->getRecipe($one); $recipe->category = $this->category->getCategory($recipe->category_id); $data = ['recipe' => $recipe, 'tags' => $this->tag->getRecipeTags($recipe->recipe_id), 'info' => $this->recipe->getPrevNextRecipes($one)]; // title設定 $this->title($recipe->title); $this->description($recipe->problem); $this->view('home.recipe.index', $data); }