title: user editor, only edit the first record
body: <p>I am working in a user editor, I have a problem, just edit the first record.</p>
  <p>when I want to edit another different user it sends me data only from the first one
  i.imgur.com/nhP8iKz.png</p>
  <pre><code>  public function usuarios(Request $request){
      $data = [
          'category_name' =&gt; 'apps',
          'page_name' =&gt; 'contacts',
          'has_scrollspy' =&gt; 0,
          'scrollspy_offset' =&gt; '',
      ];
   $usuarios = User::All();
  
      // $pageName = 'contacts';
      return view('usuarios',compact('usuarios'))-&gt;with($data);
  }
  public function userupdate(Request $request){
   
  
   foreach($request-&gt;service as $key=&gt;$value){
  
      $nuevoIngreso = User::find($value['id']);
      if($nuevoIngreso){
      $nuevoIngreso-&gt;name = $value['name'];
      $nuevoIngreso-&gt;email = $value['email'];
      $nuevoIngreso-&gt;telefono = $value['telefono'];
  
      $nuevoIngreso-&gt;tipo = $value['tipo'];
      $nuevoIngreso-&gt;save();
      }
     }
  
      // $pageName = 'contacts';
      return redirect('usuarios')-&gt;with('mensaje', 'Ficha Actualizada.');
  }
  </code></pre>
  <p>Blade.php</p>
  <pre><code>    @extends('layouts.app')
  
  
  
  @section('content')
  &lt;div id=&quot;tableCheckbox&quot; class=&quot;col-lg-12 col-12 layout-spacing&quot;&gt;
                              &lt;div class=&quot;statbox widget box box-shadow&quot;&gt;
                                  &lt;div class=&quot;widget-header&quot;&gt;
                                      &lt;div class=&quot;row&quot;&gt;
                                          &lt;div class=&quot;col-xl-12 col-md-12 col-sm-12 col-12 mt-3 text-center&quot;&gt;
                                              &lt;h2&gt;Usuarios&lt;/h2&gt;
                                          &lt;/div&gt;                       
                                      &lt;/div&gt;
                                      
                                  &lt;/div&gt;
                                  &lt;div class=&quot;widget-content widget-content-area&quot;&gt;
                                      &lt;div class=&quot;table-responsive&quot;&gt;
                                          &lt;table class=&quot;table table-bordered table-hover table-striped table-checkable table-highlight-head mb-4&quot;&gt;
                                              &lt;thead&gt;
                                                  &lt;tr&gt;
                                                      &lt;th class=&quot;checkbox-column&quot;&gt;
                                                          &lt;label class=&quot;new-control new-checkbox checkbox-primary&quot; style=&quot;height: 18px; margin: 0 auto;&quot;&gt;
                                                              &lt;input type=&quot;checkbox&quot; class=&quot;new-control-input todochkbox&quot; id=&quot;todoAll&quot;&gt;
                                                              &lt;span class=&quot;new-control-indicator&quot;&gt;&lt;/span&gt;
                                                          &lt;/label&gt;
                                                      &lt;/th&gt;
                                                      &lt;th class=&quot;&quot;&gt;Nombre&lt;/th&gt;
                                                      &lt;th class=&quot;&quot;&gt;Email&lt;/th&gt;
                                                      &lt;th class=&quot;&quot;&gt;Telefono&lt;/th&gt;
                                                      &lt;th class=&quot;text-center&quot;&gt;ACCIÓNES&lt;/th&gt;
                                                  &lt;/tr&gt;
                                              &lt;/thead&gt;
                                              &lt;tbody&gt;
                                                  @foreach($usuarios as $key=&gt;$users)
                                                  &lt;tr&gt;
                                                      &lt;td class=&quot;checkbox-column&quot;&gt;
                                                          &lt;label class=&quot;new-control new-checkbox checkbox-primary&quot; style=&quot;height: 18px; margin: 0 auto;&quot;&gt;
                                                              &lt;input type=&quot;checkbox&quot; class=&quot;new-control-input todochkbox&quot; id=&quot;todo-1&quot;&gt;
                                                              &lt;span class=&quot;new-control-indicator&quot;&gt;&lt;/span&gt;
                                                          &lt;/label&gt;
                                                      &lt;/td&gt;
                                                      &lt;td&gt;
                                                          &lt;p class=&quot;mb-0&quot;&gt;{{$users-&gt;name}}&lt;/p&gt;
                                                      &lt;/td&gt;
                                                      &lt;td&gt;{{$users-&gt;email}}&lt;/td&gt;
                                                      &lt;td&gt;{{$users-&gt;telefono}}&lt;/td&gt;
  
                                                      &lt;td class=&quot;text-center&quot;&gt;
                                                          &lt;ul class=&quot;table-controls&quot;&gt;
                                                              &lt;li&gt;&lt;a href=&quot;{{route('userupdate', $users)}}&quot;  data-placement=&quot;top&quot; title=&quot;&quot; data-original-title=&quot;Settings&quot; data-toggle=&quot;modal&quot; data-target=&quot;#registerModal&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-settings text-primary&quot;&gt;&lt;circle cx=&quot;12&quot; cy=&quot;12&quot; r=&quot;3&quot;&gt;&lt;/circle&gt;&lt;path d=&quot;M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt; &lt;/li&gt;
                                                              &lt;li&gt;&lt;a href=&quot;javascript:void(0);&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;top&quot; title=&quot;&quot; data-original-title=&quot;Edit&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-edit-2 text-success&quot;&gt;&lt;path d=&quot;M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/li&gt;
                                                              &lt;li&gt;&lt;a href=&quot;javascript:void(0);&quot; data-toggle=&quot;tooltip&quot; data-placement=&quot;top&quot; title=&quot;&quot; data-original-title=&quot;Delete&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-trash-2 text-danger&quot;&gt;&lt;polyline points=&quot;3 6 5 6 21 6&quot;&gt;&lt;/polyline&gt;&lt;path d=&quot;M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2&quot;&gt;&lt;/path&gt;&lt;line x1=&quot;10&quot; y1=&quot;11&quot; x2=&quot;10&quot; y2=&quot;17&quot;&gt;&lt;/line&gt;&lt;line x1=&quot;14&quot; y1=&quot;11&quot; x2=&quot;14&quot; y2=&quot;17&quot;&gt;&lt;/line&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/li&gt;
                                                          &lt;/ul&gt;
                                                      &lt;/td&gt;
                                                  &lt;/tr&gt;
                                                  &lt;div class=&quot;modal fade register-modal&quot; id=&quot;registerModal&quot; tabindex=&quot;-1&quot; role=&quot;dialog&quot; aria-labelledby=&quot;registerModalLabel&quot; aria-hidden=&quot;true&quot;&gt;
                                        &lt;div class=&quot;modal-dialog&quot; role=&quot;document&quot;&gt;
                                          &lt;div class=&quot;modal-content&quot;&gt;
  
                                            &lt;div class=&quot;modal-header&quot; id=&quot;registerModalLabel&quot;&gt;
                                              &lt;h4 class=&quot;modal-title&quot;&gt;Editar Usuario&lt;/h4&gt;
                                              &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-hidden=&quot;true&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-x&quot;&gt;&lt;line x1=&quot;18&quot; y1=&quot;6&quot; x2=&quot;6&quot; y2=&quot;18&quot;&gt;&lt;/line&gt;&lt;line x1=&quot;6&quot; y1=&quot;6&quot; x2=&quot;18&quot; y2=&quot;18&quot;&gt;&lt;/line&gt;&lt;/svg&gt;&lt;/button&gt;
                                            &lt;/div&gt;
                                            &lt;div class=&quot;modal-body&quot;&gt;
                                        
                                              &lt;form id=&quot;addContactModalTitle&quot; class=&quot;mt-0&quot; method=&quot;POST&quot; action=&quot;{{ route('userupdate') }}&quot;&gt;
                                                      {{method_field('PUT')}}
  @csrf
  &lt;input class=&quot;form-control&quot; type=&quot;hidden&quot; value=&quot;{{$users-&gt;id}}&quot; name=&quot;service[{{$key}}][id]&quot;&gt;
                                                 &lt;div class=&quot;form-group&quot;&gt;
                                                  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-user&quot;&gt;&lt;path d=&quot;M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2&quot;&gt;&lt;/path&gt;&lt;circle cx=&quot;12&quot; cy=&quot;7&quot; r=&quot;4&quot;&gt;&lt;/circle&gt;&lt;/svg&gt;
                                                  &lt;input type=&quot;text&quot; class=&quot;form-control mb-2&quot; name=&quot;service[{{$key}}][name]&quot; id=&quot;exampleInputUsername1&quot; value=&quot;{{$users-&gt;name}}&quot;&gt;
                                                &lt;/div&gt;
                                                &lt;div class=&quot;form-group&quot;&gt;
                                                  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-at-sign&quot;&gt;&lt;circle cx=&quot;12&quot; cy=&quot;12&quot; r=&quot;4&quot;&gt;&lt;/circle&gt;&lt;path d=&quot;M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
                                                  &lt;input type=&quot;email&quot; class=&quot;form-control mb-2&quot; name=&quot;service[{{$key}}][email]&quot; id=&quot;exampleInputEmail2&quot; value=&quot;{{$users-&gt;email}}&quot;&gt;
                                                &lt;/div&gt;
                                                &lt;div class=&quot;form-group&quot;&gt;
                                                  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-lock&quot;&gt;&lt;rect x=&quot;3&quot; y=&quot;11&quot; width=&quot;18&quot; height=&quot;11&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;&lt;path d=&quot;M7 11V7a5 5 0 0 1 10 0v4&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
                                                  &lt;input type=&quot;phone&quot; class=&quot;form-control mb-4&quot; name=&quot;service[{{$key}}][telefono]&quot; id=&quot;exampleInputPassword2&quot; value=&quot;{{$users-&gt;telefono}}&quot;&gt;
                                                &lt;/div&gt;
                                                &lt;div class=&quot;form-group&quot;&gt;
                                                  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot; stroke-width=&quot;2&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot; class=&quot;feather feather-lock&quot;&gt;&lt;rect x=&quot;3&quot; y=&quot;11&quot; width=&quot;18&quot; height=&quot;11&quot; rx=&quot;2&quot; ry=&quot;2&quot;&gt;&lt;/rect&gt;&lt;path d=&quot;M7 11V7a5 5 0 0 1 10 0v4&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
                                                  &lt;input type=&quot;phone&quot; class=&quot;form-control mb-4&quot; name=&quot;service[{{$key}}][tipo]&quot; id=&quot;exampleInputPassword2&quot; value=&quot;{{$users-&gt;tipo}}&quot;&gt;
                                                &lt;/div&gt;
                                                &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary mt-2 mb-2 btn-block&quot;&gt;Actualizar&lt;/button&gt;
                                              &lt;/form&gt;
  
                                             
  
                                            &lt;/div&gt;
                                           
                                          &lt;/div&gt;
                                        &lt;/div&gt;
                                      &lt;/div&gt;
                                               @endforeach
                                              &lt;/tbody&gt;
                                          &lt;/table&gt;
                                      &lt;/div&gt;
  
                                    
  
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
  
  
        
  
     @endsection
  </code></pre>
  <p>Routes:</p>
  <pre><code> Route::get('usuarios','HomeController@usuarios');
  Route::put('/usuarios', 'HomeController@userupdate' )-&gt;name('userupdate');
  </code></pre>
  <p>if necessary I can upload a screenshot of the problem to better understand.</p>
  <p>When I click on edit the user ID = 2, or 3 sends me data from the user ID 1 only. in list it prints all the records, but in the form it only prints the first user</p>