app/Http/Controllers/ChannelController.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(Request $request, $id)
    {
        $channel = new Channel();
        $channelID   = $request->echannelID;
        $channelName = $request->echannelName;
        $status      = $request->echannelStatusCode;
        $channelCode = $request->echannelCode;
        $result = $channel->updateChannel($channelID, $channelName, $status, $channelCode);
        if($result) {
             \Session::flash('flash_message','Channel updated successfully.');
        } else {
             \Session::flash('error_message','Error in handling request.');
        }
        return redirect('channels');
    }
public function update ( Request $ request , $ id ) { $ channel = new Channel ( ) ; $ channelID = $ request -> echannelID ; $ channelName = $ request -> echannelName ; $ status = $ request -> echannelStatusCode ; $ channelCode = $ request -> echannelCode ; $ result = $ channel -> updateChannel ( $ channelID , $ channelName , $ status , $ channelCode ) ; if ( $ result ) { \ Session :: flash ( 'flash_message' , 'Channel updated successfully.' ) ; } else { \ Session :: flash ( 'error_message' , 'Error in handling request.' ) ; } return redirect ( 'channels' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// redirect to index after save