public function store(Request $request)
    {
        $validation = app(ValidationService::class)->check(Blog::$rules);

        if (!$validation['errors']) {
            $blog = $this->repository->store($request->all());
            Cms::notification('Blog saved successfully.', 'success');
        } else {
            return $validation['redirect'];
        }

        if (!$blog) {
            Cms::notification('Blog could not be saved.', 'warning');
        }

        return redirect(route($this->routeBase.'.blog.edit', [$blog->id]));
    }
public function store(Request $request)
    {
        $validation = app(ValidationService::class)->check(Blog::$rules);

        if (!$validation['errors']) {
            $blog = $this->repository->store($request->all());
            Cms::notification('Blog saved successfully.', 'success');
        } else {
            return $validation['redirect'];
        }

        if (!$blog) {
            Cms::notification('Blog could not be saved.', 'warning');
        }

        return redirect(route($this->routeBase.'.blog.edit', [$blog->id]));
    }
public function store ( Request $ request ) { $ validation = app ( ValidationService :: class ) -> check ( Blog :: $ rules ) ; if ( ! $ validation [ 'errors' ] ) { $ blog = $ this -> repository -> store ( $ request -> all ( ) ) ; Cms :: notification ( 'Blog saved successfully.' , 'success' ) ; } else { return $ validation [ 'redirect' ] ; } if ( ! $ blog ) { Cms :: notification ( 'Blog could not be saved.' , 'warning' ) ; } return redirect ( route ( $ this -> routeBase . '.blog.edit' , [ $ blog -> id ] ) ) ; }
Store a newly created Blog in storage.

@param BlogRequest $request

@return Response
Store a newly created Blog in storage .