<table id="example" class="display" style="width:100%">
<thead>
<tr>
<th>Id</th>
<th>Producto</th>
<th>Precio</th>
<th>Marca</th>
<th>
</tr>
</thead>
<tbody>
@foreach ($productos as $producto)
<tr>
<td>{{$producto->id}}</td>
<td>{{$producto->producto}}</td>
<td>{{$producto->precio}}</td>
<td>{{$producto->marca}}</td>
<td>
<a class="btn btn-primary btn-group-sm col-lg-offset-2 active"
data-toggle="modal" href="#modal-eliminar{{$producto->id}}"
> <i class="fa fa-trash"></i>
</a>
</td>
@endforeach
</tbody>
</table>
This is my modal where I receive the parameter the problem that I have is that if I detect the id that I select but then I will not have the modal if I remove {{$ product-> g}} from the href and the modal that receives it there if it opens
<div class="modal fade" id="modal-eliminar{{$producto->id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Productos Eliminar</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body mx-6">