/**
  * @param $one
  */
 public function getCategory($one)
 {
     $category = $this->category->getCategory($one);
     $data = ['category' => $category, 'list' => $this->recipe->getRecipesFromCategory($one)];
     $this->title($category->description);
     $this->description($category->description);
     $this->view('home.category.index', $data);
 }
 /**
  * @return \Illuminate\Http\JsonResponse
  */
 public function index()
 {
     $input = \Input::get('format', 'json');
     $array = [];
     $result = $this->recipe->getRecipesFromCategory();
     if ($result) {
         foreach ($result as $row) {
             $params = ['id' => $row->recipe_id, 'title' => $row->title, 'category' => ['name' => $row->name]];
             $array[] = $params;
             if ($input == 'hal') {
                 $this->hal->addLink('recipes', route('home.recipe', ['one' => $row->recipe_id]), $params);
             }
         }
     }
     if ($input == 'hal') {
         $this->hal->setUri('self');
         $this->hal->addLink('self', route('home.index'));
         $array = $this->hal;
     }
     return $this->render($array, $input);
 }