app/Http/Controllers/ArticleCommentController.php
/**
     * Update the specified resource in storage.
     *
     * @param Request $request
     * @param Article $article
     * @param ArticleComment $articleComment
     * @return Response
     */
Update the specified resource in storage.
@param Request $request
@param Article $article
@param ArticleComment $articleComment
@return Response
Update the specified resource in storage . @param Request $request @param Article $article @param ArticleComment $articleComment @return Response
public function update(Request $request, Article $article, ArticleComment $articleComment)
    {
        if ($article->authorized_comment && $articleComment->is_mine) {
            $validatedData = $request->validate([
                'content' => 'required|max:250',
            ]);
            $articleComment->fill($validatedData);
            $articleComment->save();
            session()->flash('status', trans('article.comment.submit_comment.comment.edit'));
        }
        return redirect()->route('article.show', [$article, $article->slug]);
    }
public function update ( Request $ request , Article $ article , ArticleComment $ articleComment ) { if ( $ article -> authorized_comment && $ articleComment -> is_mine ) { $ validatedData = $ request -> validate ( [ 'content' => 'required|max:250' , ] ) ; $ articleComment -> fill ( $ validatedData ) ; $ articleComment -> save ( ) ; session ( ) -> flash ( 'status' , trans ( 'article.comment.submit_comment.comment.edit' ) ) ; } return redirect ( ) -> route ( 'article.show' , [ $ article , $ article -> slug ] ) ; }
Update the specified resource in storage.
Update the specified resource in storage .