/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id, Category $categoryModel, Provider $providerModel)
 {
     if (!right('EditCategory')) {
         abort(404);
     }
     $category = $categoryModel->getCategory($id);
     if (count($category) < 1) {
         abort(404);
     }
     $fullList = $categoryModel->getFullCategoriesList();
     $providers_list = $providerModel->getExistInCategoryProvedrsList($id);
     $chain = $categoryModel->getParents($id);
     return view('category.edit')->with('title', 'Редактирование категории ' . $category->name)->with('category', $category)->with('chain', $chain)->with('fullList', $fullList)->with('provider_list', $providers_list)->with('current_id', $id);
 }