app/Http/Controllers/CommentController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UpdateCommentRequest $request, $id)
    {
        $comment = Comment::find($id);
            $comment->comment = $request->comment;
        $comment->save();
        Log::info(Auth::user()->username . " (" . Auth::user()->id . ") UPDATED comment (" . $comment->id . ")\r\n", 
            [json_decode($comment, true)]
        );
        Session::flash('success', 'Comment updated');
        return redirect()->route('posts.show', $comment->post->id);
    }
public function update ( UpdateCommentRequest $ request , $ id ) { $ comment = Comment :: find ( $ id ) ; $ comment -> comment = $ request -> comment ; $ comment -> save ( ) ; Log :: info ( Auth :: user ( ) -> username . "  ( " . Auth :: user ( ) -> id . " ) UPDATED comment ( " . $ comment -> id . " ) \r \n " , [ json_decode ( $ comment , true ) ] ) ; Session :: flash ( 'success' , 'Comment updated' ) ; return redirect ( ) -> route ( 'posts.show' , $ comment -> post -> id ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// Save entry to log file using built-in Monolog