/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(CategoryRequest $request) { $product_category = ProductCategory::create(['product_category_name' => $request->product_category_name]); //redirection after saving $all_category = ProductCategory::all(); return view('product.productCategoryList', ['all_category' => $all_category]); }