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);
 }
예제 #2
0
 public function toCategory($value = '')
 {
     Log::info("进入书籍类别");
     $categorys = Category::whereNull('parent_id')->get();
     return view('category')->with('categorys', $categorys);
 }