app/Http/Controllers/ProductController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdateProductRequest $request, Product $product)
    {
        $inputs = $request->except('submit');
        $inputs['image'] = File::update('products', 'image', $product);
        $product->update($inputs);
        return $this->redirect($product);
    }
public function update ( UpdateProductRequest $ request , Product $ product ) { $ inputs = $ request -> except ( 'submit' ) ; $ inputs [ 'image' ] = File :: update ( 'products' , 'image' , $ product ) ; $ product -> update ( $ inputs ) ; return $ this -> redirect ( $ product ) ; }
Update the specified resource in storage.
Update the specified resource in storage .