public function store()
    {
        $attributes = request()->validate(Banner::$rules, Banner::$messages);

        $attributes['hide_name'] = boolval(input('hide_name'));
        $attributes['is_website'] = boolval(input('is_website'));

        $photo = $this->uploadBanner($attributes['photo']);
        if ($photo) {
            $attributes['image'] = $photo;
            unset($attributes['photo']);
            $banner = $this->createEntry(Banner::class, $attributes);
        }

        return redirect_to_resource();
    }
public function store()
    {
        $attributes = request()->validate(Banner::$rules, Banner::$messages);

        $attributes['hide_name'] = boolval(input('hide_name'));
        $attributes['is_website'] = boolval(input('is_website'));

        $photo = $this->uploadBanner($attributes['photo']);
        if ($photo) {
            $attributes['image'] = $photo;
            unset($attributes['photo']);
            $banner = $this->createEntry(Banner::class, $attributes);
        }

        return redirect_to_resource();
    }
public function store ( ) { $ attributes = request ( ) -> validate ( Banner :: $ rules , Banner :: $ messages ) ; $ attributes [ 'hide_name' ] = boolval ( input ( 'hide_name' ) ) ; $ attributes [ 'is_website' ] = boolval ( input ( 'is_website' ) ) ; $ photo = $ this -> uploadBanner ( $ attributes [ 'photo' ] ) ; if ( $ photo ) { $ attributes [ 'image' ] = $ photo ; unset ( $ attributes [ 'photo' ] ) ; $ banner = $ this -> createEntry ( Banner :: class , $ attributes ) ; } return redirect_to_resource ( ) ; }
Store a newly created banner in storage.

@return Response
Store a newly created banner in storage .