public function toProductAdd() { $categories = Category::whereNotNull('parent_id')->get(); return view('admin.product_add')->with('categories', $categories); }