Laravel + Tailwind: How to Pass Data to Modal

  laravel

I understand there are very similar questions, but what I’m asking for is Tailwind Modal. The ones I’ve seen are for bootstrap and it does not work.

I’m just looking for a generic/simple way to pass data without using plugins. Please help, thank you.

@foreach($rentals as $rental)
  <a href="{{ route('rentals.destroy', $rental->id) }}">--}} aria-label="Delete">
    Delete
  </a>
@endforeach

Tailwind Modal:

<form action="HOW_TO_GET_ID???" method="POST">
    @csrf
    @method('DELETE')
    <button class=""
            type="submit"
            title="delete">
        Yes
    </button>
</form>

Source: Laravel

Leave a Reply