app/Http/Controllers/Settings/ProfileController.php
public function update(Request $request)
    {
        $user = $request->user();

        $this->validate($request, [
            'name' => 'required',
            'email' => 'required|email|unique:users,email,'.$user->id,
        ]);

        return tap($user)->update($request->only('name', 'email'));
    }
public function update(Request $request)
    {
        $user = $request->user();

        $this->validate($request, [
            'name' => 'required',
            'email' => 'required|email|unique:users,email,'.$user->id,
        ]);

        return tap($user)->update($request->only('name', 'email'));
    }
public function update ( Request $ request ) { $ user = $ request -> user ( ) ; $ this -> validate ( $ request , [ 'name' => 'required' , 'email' => 'required|email|unique:users,email,' . $ user -> id , ] ) ; return tap ( $ user ) -> update ( $ request -> only ( 'name' , 'email' ) ) ; }
Update the user's profile information.

@param  \Illuminate\Http\Request $request
@return \Illuminate\Http\Response
Update the user s profile information .