original_string: protected function updateUserPorfile($data)
      {
          $data = $data->except('email');
  
          if ($data instanceof Collection) {
              $data = $data->toArray();
          }
  
          if (isset($data['password'])) {
              $data['password'] = Hash::make($data['password']);
          }
  
          Auth::user()->update($data);
      }
code: protected function updateUserPorfile($data)
      {
          $data = $data->except('email');
  
          if ($data instanceof Collection) {
              $data = $data->toArray();
          }
  
          if (isset($data['password'])) {
              $data['password'] = Hash::make($data['password']);
          }
  
          Auth::user()->update($data);
      }
code_tokens: protected function updateUserPorfile ( $ data ) { $ data = $ data -> except ( 'email' ) ; if ( $ data instanceof Collection ) { $ data = $ data -> toArray ( ) ; } if ( isset ( $ data [ 'password' ] ) ) { $ data [ 'password' ] = Hash :: make ( $ data [ 'password' ] ) ; } Auth :: user ( ) -> update ( $ data ) ; }
docstring: Updates the user profile with the given data.
  
  @param  \Illuminate\Http\Request|Collection $data
  
  @return void
docstring_tokens: Updates the user profile with the given data .