public function update(Article $article, ArticlesFormRequest $request)
    {
        $article->fill($request->all());
        $article->published     = $request->get('published', false);
        $article->featured      = $request->get('featured', false);
        $article->authenticated = $request->get('authenticated', false);
        $article->is_page       = $request->get('is_page', false);
        $article->save();

        $article->permissions()->sync($request->get('permissions', []));
        if ($request->tags) {
            $article->retag(explode(',', $request->tags));
        }

        event(new ArticleWasUpdated($article));

        flash()->success(trans('cms::article.update.success'));

        return redirect()->route('administrator.articles.index');
    }
public function update(Article $article, ArticlesFormRequest $request)
    {
        $article->fill($request->all());
        $article->published     = $request->get('published', false);
        $article->featured      = $request->get('featured', false);
        $article->authenticated = $request->get('authenticated', false);
        $article->is_page       = $request->get('is_page', false);
        $article->save();

        $article->permissions()->sync($request->get('permissions', []));
        if ($request->tags) {
            $article->retag(explode(',', $request->tags));
        }

        event(new ArticleWasUpdated($article));

        flash()->success(trans('cms::article.update.success'));

        return redirect()->route('administrator.articles.index');
    }
public function update ( Article $ article , ArticlesFormRequest $ request ) { $ article -> fill ( $ request -> all ( ) ) ; $ article -> published = $ request -> get ( 'published' , false ) ; $ article -> featured = $ request -> get ( 'featured' , false ) ; $ article -> authenticated = $ request -> get ( 'authenticated' , false ) ; $ article -> is_page = $ request -> get ( 'is_page' , false ) ; $ article -> save ( ) ; $ article -> permissions ( ) -> sync ( $ request -> get ( 'permissions' , [ ] ) ) ; if ( $ request -> tags ) { $ article -> retag ( explode ( ',' , $ request -> tags ) ) ; } event ( new ArticleWasUpdated ( $ article ) ) ; flash ( ) -> success ( trans ( 'cms::article.update.success' ) ) ; return redirect ( ) -> route ( 'administrator.articles.index' ) ; }
Update selected article.

@param \Yajra\CMS\Entities\Article $article
@param ArticlesFormRequest $request
@return mixed
Update selected article .