Using HTMX in Laravel

I’m using Laravel 9 and I’m looking for a way to use HTMX inside the Laravel blades.

So I tried including it at my master blade:

<script src="https://unpkg.com/[email protected]/dist/htmx.min.js"></script>

Then I changed this on my blade:

<form method="GET" action="{{ route('auth.login.next.passwd') }}">
     <button id="login" class="btn">Get the password</button>
</form>

To this:

<button id="login" hx-get="{{ route('auth.login.next.passwd') }}" class="btn">Get the password</button>

However it does not work.

There must be something here that I’m doing wrong but I don’t know what is.

So if you know how to call htmx inside Laravel in order for using at blades, please let me know, thanks.