Laravel 9.28 and Livewire 2, wire:loader dont work

Viewed 22

I just can't get wire:loading to run. I have tried several variations but nothing has helped.

I have created a component submit button that looks like this:

<button type="submit" {{ $attributes->merge(['class' => 'btn btn-primary']) }}>
<svg wire:loading.delay width="40" viewBox="0 0 120 30" xmlns="http://www.w3.org/2000/svg" fill="#fff">
    <circle cx="15" cy="15" r="15">
        <animate attributeName="r" from="15" to="15"
                 begin="0s" dur="0.8s"
                 values="15;9;15" calcMode="linear"
                 repeatCount="indefinite" />
        <animate attributeName="fill-opacity" from="1" to="1"
                 begin="0s" dur="0.8s"
                 values="1;.5;1" calcMode="linear"
                 repeatCount="indefinite" />
    </circle>
    <circle cx="60" cy="15" r="9" fill-opacity="0.3">
        <animate attributeName="r" from="9" to="9"
                 begin="0s" dur="0.8s"
                 values="9;15;9" calcMode="linear"
                 repeatCount="indefinite" />
        <animate attributeName="fill-opacity" from="0.5" to="0.5"
                 begin="0s" dur="0.8s"
                 values=".5;1;.5" calcMode="linear"
                 repeatCount="indefinite" />
    </circle>
    <circle cx="105" cy="15" r="15">
        <animate attributeName="r" from="15" to="15"
                 begin="0s" dur="0.8s"
                 values="15;9;15" calcMode="linear"
                 repeatCount="indefinite" />
        <animate attributeName="fill-opacity" from="1" to="1"
                 begin="0s" dur="0.8s"
                 values="1;.5;1" calcMode="linear"
                 repeatCount="indefinite" />
    </circle>
</svg>
{{ $slot }}
</button>

My form looks like this

<form method="POST" action="{{ route('login') }}">
@csrf
<div class="row g-3">
    <div class="col-12">
        <input type="email" name="email" class="form-control">
    </div>
    <div class="col-12">
        <x-submitbutton>Login</x-submitbutton>
    </div>
</div>
</form>

@livewireStyles and @livewireScripts are attached correctly and are accessible via the url. I also get no error message in the console.log.

For testing reasons I pulled a fresh laravel installation and installed livewire, but nothing happens there either. Maybe I'm making a basic mistake that I don't realize?! Is laravel 9.28 compatible with livewire 2, has anyone else had problems or similar experiences? Sitting already two days on the probelm and can not solve it! To despair!

0 Answers
Related