app/Http/Controllers/TagController.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(UpdateTagRequest $request, $id)
    {
        $tag = Tag::find($id);
            $tag->name = $request->input('name');
        $tag->save();
        Log::info(Auth::user()->username . " (" . Auth::user()->id . ") UPDATED tag (" . $tag->id . ")\r\n", 
            [json_decode($tag, true)]
        );
        Session::flash ('success', 'The tag :  ' . $tag->name . ' was successfully updated!');
        return redirect()->route('tags.index');
    }
public function update ( UpdateTagRequest $ request , $ id ) { $ tag = Tag :: find ( $ id ) ; $ tag -> name = $ request -> input ( 'name' ) ; $ tag -> save ( ) ; Log :: info ( Auth :: user ( ) -> username . "  ( " . Auth :: user ( ) -> id . " ) UPDATED tag ( " . $ tag -> id . " ) \r \n " , [ json_decode ( $ tag , true ) ] ) ; Session :: flash ( 'success' , 'The tag :  ' . $ tag -> name . ' was successfully updated!' ) ; return redirect ( ) -> route ( 'tags.index' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// Get the category value from the database // Save entry to log file using built-in Monolog // Set flash data with success message // Redirect to posts.show