0

This is the code that i have in index.blade.php

@foreach (posts asitem)
  <!-- Someting -->
  <form name="f" method="POST" action="route...">
    @csrf
    @method('DELETE')
    <button class="modal-open"><i class="fas fa-edit"></i></button>
    <!-- Delete button... -->
  </form>
@endforeach

How i can open a modal window with the data from item where i clicked the edit button and not the others? (When i tried the code always give me the data of the frist or the lastitem)

Thank you all and sorry for the inconvenience.

Anonymous Asked question May 14, 2021