The simple & best way to do it on the page load itself load all the edit modals inside foreach loop like below and give unique ID for the modals.
<table>
<tr>
<td>Name</td>
<td<Edit</td>
</tr>
@foreach($contacts as $contact)
<tr>
<td>{{$contact->name}}</td>
<td>
<button class="btn btn-warning btn-sm" data-toggle="modal" data-id="{{ $contact->id }}" data-target="#editModal{{$contact->id}}"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> <strong>Edit</strong> </button>
</td>
</tr>
<!-- add edit modal -->
<div id="editModal{{$contact->id}}" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Edit {{$contact->name}}</h4><br>
</div>
<div class="modal-body">
{{ Form::open(array('url' => 'http://yourdomain/updatecontact/'.$contact->id)) }}
<input type="text" name="first_name" value="{{$contact->first_name}}">
<input type="text" name="email" value="{{$contact->email}}">
<input type="text" name="phone" value="{{$contact->phone}}">
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-default" >Save</button>
{{ Form::close()}}
</div>
</div>
</div>
</div>
<!-- ./add edit modal -->
@endforeach
</table>
Make sure you have included the bootstrap library for enabling modal popups.