Fix: Livewire 503 löst echten Page-Reload aus statt Modal-Rendering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main v1.1.281
boban 2026-04-26 09:17:00 +02:00
parent 227c623578
commit 8fd9fccc70
1 changed files with 12 additions and 0 deletions

View File

@ -214,5 +214,17 @@
@vite(['resources/js/app.js'])
@livewireScripts
@livewire('wire-elements-modal')
<script>
document.addEventListener('livewire:init', () => {
Livewire.hook('request', ({ fail }) => {
fail(({ status, preventDefault }) => {
if (status === 503) {
preventDefault()
setTimeout(() => window.location.reload(), 500)
}
})
})
})
</script>
</body>
</html>