feat: broadcasting item to refresh pages

This commit is contained in:
2022-11-13 21:04:45 -03:00
parent 567adce732
commit 7c09fc4896
21 changed files with 1354 additions and 135 deletions

View File

@@ -2,15 +2,7 @@
@section('content')
<script type="text/javascript">
setInterval(
function() {
if (!document.hasFocus() ) {
window.location.reload(true);
}
},
2*60000); //NOTE: period is passed in milliseconds
</script>
@vite('resources/js/pusher.js')
<div class="container">
<div class="row justify-content-center">
@@ -53,4 +45,4 @@
</div>
</div>
</div>
@endsection
@endsection

View File

@@ -11,7 +11,7 @@
<title>{{ config('app.name', 'Laravel') }} {{ isset($usedItems) && $usedItems > 0 ? "(${usedItems})" : '' }}</title>
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
@vite('resources/js/app.js')
<!-- Fonts -->
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
@@ -88,4 +88,4 @@
</div>
</body>
</html>
</html>