app/Http/Controllers/Backend/SliderController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(SliderUpdateRequest $request,Slider $slider)
    {
       $all = $request->all();
        $all['image'] = (new SimpleUpload)
            ->file($request->image)
            ->dirName('sliders')
            ->deleteIfExists($slider->image)
            ->save();
        $all = $slider->update($all);
        return back()->with('message', 'Slider Update Successfully!');
    }
public function update ( SliderUpdateRequest $ request , Slider $ slider ) { $ all = $ request -> all ( ) ; $ all [ 'image' ] = ( new SimpleUpload ) -> file ( $ request -> image ) -> dirName ( 'sliders' ) -> deleteIfExists ( $ slider -> image ) -> save ( ) ; $ all = $ slider -> update ( $ all ) ; return back ( ) -> with ( 'message' , 'Slider Update Successfully!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .