/**
  * Display a listing of the Category.
  *
  * @param Request $request
  *
  * @return Response
  */
 public function index(Request $request)
 {
     $input = $request->all();
     $result = $this->categoryRepository->search($input);
     $categories = $result[0];
     return Response::json(ResponseManager::makeResult($categories->toArray(), "Categories retrieved successfully."));
 }
 /**
  * Display a listing of the Category.
  *
  * @param Request $request
  *
  * @return Response
  */
 public function index(Request $request)
 {
     $input = $request->all();
     $result = $this->categoryRepository->search($input);
     $categories = $result[0];
     $attributes = $result[1];
     return view('categories.index')->with('categories', $categories)->with('attributes', $attributes);
 }