It really depends. We don't know anything about your webhook or how it's called or what you're doing with it, so showing your code would be helpful if you want something to work with your specific scenario.
How to auto reload a page when the data is changed?
I am using a webhook to receive incoming data and update my existing table from my controller. I need to figure out how to automatically refresh the page when the webhook does it. Currently, I have to manually refresh the page to see the new coming data. I checked on many JS, but they are not working. Any ideas? Thank you, guys.
I think the best way to really do this is with broadcasting: https://laravel.com/docs/5.5/broadcasting
Another option is to use ajax on a timer to check for changes and update the page if there are any. This isn't as good as broadcasting because in your webhook, you can basically broadcast and event that "I've been updated" and the listener in the view would trigger a reload or something when it receives the notice.
The thing is, your view is already drawn and sent to your browser. Storing something in session in the webhook won't do anything because the view is already created and won't know about the updated session variable. So the ajax and broadcasting solutions get around that and are the only way to update a view that's already in the browser.
Please or to participate in this conversation.