app/Http/Controllers/Backend/SliderController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(SliderRequest $request)
    {
         $all =($request->all());
        $all['image'] = (new SimpleUpload)
            ->file($request->image)
            ->dirName('sliders')
            ->save();
        Slider::create($all);
        return back()->with('message', 'Slider Added Successfully!');
    }
public function store ( SliderRequest $ request ) { $ all = ( $ request -> all ( ) ) ; $ all [ 'image' ] = ( new SimpleUpload ) -> file ( $ request -> image ) -> dirName ( 'sliders' ) -> save ( ) ; Slider :: create ( $ all ) ; return back ( ) -> with ( 'message' , 'Slider Added Successfully!' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .