/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(Request $request) { $product = Product::create($request->all()); //Save Product Images $this->saveProductImages($request->get('productImage'), $product->id); //Save Product Images $this->saveProductPrices($request->get('price'), $product->id); //Save Product Categoryies $this->saveCategories($request->get('categories'), $product->id); //Save Product Attributes //$this->saveAttribute($request->get('attribute'), $product->id); $product->slug = str_slug($request->get('name')); //update File Path and Slug $product->save(); return redirect("/admin/product"); }