<script>
    /* Refresh sesije ajax pozivom */
    $(function() {

        var blade = {
            refresh_session_url: "{{ route('refresh_session') }}",
            session_refresh_interval: "{{ config('newscms.session_refresh_interval_in_seconds') }}"
        }

        var sessionRefreshIntervalInSeconds = blade.session_refresh_interval;

        setInterval(function() {
           $.get(blade.refresh_session_url);
        }, sessionRefreshIntervalInSeconds * 1000);
    });
</script>