Poll for state changes based on a specified interval without page refreshes. Hot dog!
You can add a wire:poll
directive to your elements to poll for changes using a set interval. The default interval is set to poll every 2 seconds.
You can append a different interval time to your directive as well.
Polling for changes over AJAX can be a resonable alternative to strategies such as Pusher or WebSockets.
If you would like to invoke a method during each poll interval, you can do so by specifying a method name.
If you want stop polling, you can simply no longer render the HTML element that has the wire:poll
directive.