/** * Show the form for editing the specified resource. * * @param int Categories $category * @return Response */ public function edit(Category $category) { $parentIdNameArr = Category::getParents(); $selectedParentIdNameArr = CategoryParentAndChildren::getSelectedParentIdNameArr($category->id); $ddArr = CategoryParentAndChildren::makeDDArr($parentIdNameArr, $selectedParentIdNameArr, $category->id); return view('categories.edit', compact('category', 'ddArr', 'selectedParentIdNameArr')); }