title: Laravel modal loads only last entry
body: <p>I have been trying to use modal to create and edit entries in Laravel. I am using simple modal instead of ajax. I can add entries, but when I try to edit an entry, it only loads the last entry in the modal.</p>
  
  <p>Here is my index (from where I am calling modal)</p>
  
  <pre><code>@foreach ($clients as $client)
         &lt;tr&gt;
         &lt;td&gt;{{ $client-&gt;name }}&lt;/td&gt;
         &lt;td&gt;&lt;button data-target="modal2" class="btn modal-trigger1"&gt;&lt;a href="{{route('client.edit', $client-&gt;id)}}"&gt;Edit&lt;/a&gt;&lt;/button&gt;&lt;/td&gt;
         &lt;/tr&gt;
  @endforeach
  </code></pre>
  
  <p>Here is edit file (modal file)</p>
  
  <pre><code>&lt;div id="modal2" class="modal"&gt;
      &lt;div class="panel panel-default"&gt;
          &lt;div class="modal-content"&gt;
              &lt;p class="flow-text"&gt;Edit client&lt;/p&gt;
              &lt;form class="form" role="form" method="POST" action="{{ url('/client/'. $client-&gt;id) }}"&gt;
  
                  &lt;input type="hidden" name="_method" value="patch"&gt;
                  {!! csrf_field() !!}
  
                  &lt;div class="form-group{{ $errors-&gt;has('name') ? ' has-error' : '' }}"&gt;
                      &lt;label class="control-label"&gt;Name&lt;/label&gt;
                      &lt;input type="text" class="form-control" name="name" value="{{ $client-&gt;name }}"&gt;
                      @if ($errors-&gt;has('name'))
                          &lt;span class="help-block"&gt;
                          &lt;strong&gt;{{ $errors-&gt;first('name') }}&lt;/strong&gt;
                      &lt;/span&gt;
                      @endif
                  &lt;/div&gt;
  
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;   
  </code></pre>
  
  <p>And the edit in controller is</p>
  
  <pre><code>public function edit($id)
      {
          $clients = Client::findOrFail($id);
          return view('client.edit', compact('clients'));
      }
  </code></pre>
  
  <p>It only loading the last entry in the table, not the entry id in the row.</p>
  
  <p>I am using Laravel 5.3. Please help</p>