Skip to content

Commit

Permalink
Add session expiration logic
Browse files Browse the repository at this point in the history
  • Loading branch information
riasvdv authored Oct 9, 2023
1 parent ed2c204 commit 69a6304
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/views/dashboard.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@
})
},
});
document.addEventListener('livewire:init', () => {
Livewire.hook('request', ({ fail }) => {
fail(({ status, preventDefault }) => {
if (status === 419) {
preventDefault();
window.location.reload();
}
})
});
});
</script>


Expand Down

0 comments on commit 69a6304

Please sign in to comment.