public function toCategoryEdit(Request $request) { $id = $request->input('id', ''); $category = Category::find($id); $categories = Category::whereNull('parent_id')->get(); return view('admin/category_edit')->with('category', $category)->with('categories', $categories); }
public function toCategory($value = '') { Log::info("进入书籍类别"); $categorys = Category::whereNull('parent_id')->get(); return view('category')->with('categorys', $categorys); }