app/Http/Controllers/UsersController.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)
    {
        $user = new Users();
        $userID    = $request->euserID;
        $username  = $request->eusername;
        $userType  = $request->euserType;
        $clientID  = $request->euserClientID;
        $status    = $request->euserStatusCode;
        $userGroup = $request->euserGroup;
        $result =  $user->updateUser($userID, $username, $userType, $clientID, $status, $userGroup);
        if($result) {
             \Session::flash('flash_message','User details updated successfully.');
        } else {
             \Session::flash('error_message','Error in handling request.');
        }
        return redirect('users');
    }
public function update ( Request $ request , $ id ) { $ user = new Users ( ) ; $ userID = $ request -> euserID ; $ username = $ request -> eusername ; $ userType = $ request -> euserType ; $ clientID = $ request -> euserClientID ; $ status = $ request -> euserStatusCode ; $ userGroup = $ request -> euserGroup ; $ result = $ user -> updateUser ( $ userID , $ username , $ userType , $ clientID , $ status , $ userGroup ) ; if ( $ result ) { \ Session :: flash ( 'flash_message' , 'User details updated successfully.' ) ; } else { \ Session :: flash ( 'error_message' , 'Error in handling request.' ) ; } return redirect ( 'users' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// instantiate model class // get params from post request // call function from model to update user data // redirect to index after save