Credit goes to both Saurabh & freefugga as both seems to be a best Answer.
Trick 1 :
Make a Store Owner User for yourself, link it with all the restaurants you have. And open this user.
Boom!! you as an admin will receive all order notifications and ringing, and the page will auto-refresh too!
Trick 2 :
"Whenever a new order comes" is a bit tricky to do.
Could be done on Ajax by: passing all the current order IDs and then fetching the new IDs every x seconds and comparing the IDs and taking action of reloading.
Or the best way is via Sockets (more complex)
The easiest way to do is: On any page where you required the page to be auto-reload after x seconds insert the code just before the @endsection
on any blade.php
file.
<script>
$(function() {
setInterval(function() {
window.location.reload();
}, 15 * 1000);
});
</script>
The code above will reload the page every 15 seconds.
Change 15 to any seconds you want.
Files to be touched :
resources/views/admin/dashboard.blade.php
resources/views/admin/orders.blade.php