app/Http/Controllers/Admin/AdminCustomerController.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->name = $request->input('name');
        $user->email = $request->input('email');
        $user->username = $request->input('username');
        $user->role = $request->input('role');
        $user->save();
        return redirect('/admin/customers')->with('success','Customer info edited successfully!');
    }
public function update ( Request $ request , $ id ) { $ user = User :: find ( $ id ) ; $ user -> name = $ request -> input ( 'name' ) ; $ user -> email = $ request -> input ( 'email' ) ; $ user -> username = $ request -> input ( 'username' ) ; $ user -> role = $ request -> input ( 'role' ) ; $ user -> save ( ) ; return redirect ( '/admin/customers' ) -> with ( 'success' , 'Customer info edited successfully!' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .