app/Http/Controllers/Admin/UserController.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 = User::find($id);
        $user->f_name = $request->firstName;
        $user->l_name = $request->lastName;
        $user->email = $request->email;
        $user->phone_no = $request->phone_no;
        $user->address = $request->address;
        if($user->save()){
            return redirect()->route('users.index')->with('message','Record Updated Successfully');
        }else{
            return redirect()->route('users.index')->with('message','Something Went Wrong');
        }
    }
public function update ( Request $ request , $ id ) { $ user = User :: find ( $ id ) ; $ user -> f_name = $ request -> firstName ; $ user -> l_name = $ request -> lastName ; $ user -> email = $ request -> email ; $ user -> phone_no = $ request -> phone_no ; $ user -> address = $ request -> address ; if ( $ user -> save ( ) ) { return redirect ( ) -> route ( 'users.index' ) -> with ( 'message' , 'Record Updated Successfully' ) ; } else { return redirect ( ) -> route ( 'users.index' ) -> with ( 'message' , 'Something Went Wrong' ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .