Level 15
Strange enough it works now!
I created a flash message that shows three seconds, like this:
@if(session()->has('success')
<div x-data="{ show: true }" x-init="setTimeout(() => { show = false })" x-show="show">
{{ session()->get('success') }}
</div>
@endif
I use it in Livewire like this:
session()->flash('success', 'Success message');
But the second time it does not show, I guess because the show property is already set to false.
So, is there a better approach to this problem?
Strange enough it works now!
Please or to participate in this conversation.