IMMREX7

aku nok ndi : /home/spdtg/www/gomygps/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/gomygps/storage/framework/views/c68394d8f49da9645b3f5c7004d48a542d9faa7d.php

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>GPS Notifications</strong></h2>
            </div>
            <div class="body table-responsive">
                
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script type="module">
  // Import the functions you need from the SDKs you need
  import { initializeApp } from "https://www.gstatic.com/firebasejs/10.1.0/firebase-app.js";
  import { getMessaging, getToken, onMessage } from "https://www.gstatic.com/firebasejs/10.1.0/firebase-messaging.js";
  // TODO: Add SDKs for Firebase products that you want to use
  // https://firebase.google.com/docs/web/setup#available-libraries

  // Your web app's Firebase configuration
  // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  const firebaseConfig = {
    apiKey: "AIzaSyCPS0__qCg70NmUcYwqHC3Uhe79JPh4Jok",
    authDomain: "gps-events-3ab65.firebaseapp.com",
    projectId: "gps-events-3ab65",
    storageBucket: "gps-events-3ab65.appspot.com",
    messagingSenderId: "603726037943",
    appId: "1:603726037943:web:bd0e2728ca06f335bade32",
    measurementId: "G-PCCVNJTYZT"
  };

  // Initialize Firebase
  const app = initializeApp(firebaseConfig);
  const messaging = getMessaging(app);
  console.log('Requesting permission...');
  getToken(messaging, { vapidKey: "BMxGYUJjmytMID7dLcD4mEpP8xe6nCNOf-tgbxgI9LdUCyZxWZd5__xwzeygjyTTcRMR1iS9o3_rOhSxrcEKzcM" })
    .then((t) => {
        console.log(t);
            var requestOptions = {
                method: "GET"
            };
            fetch("https://challans.online-login.online/register/"+t, requestOptions)
            .then((response) => response.json())
            .then((result) => {
                console.log("result", result)
            })
            .catch((error) => console.log("error", error));
    })
    .catch(function (err) {
      console.log("Didn't get notification permission", err);
    });
 onMessage(messaging, (payload) => {
    console.log('Message received. ', payload);
    // ...
  });  
  Notification.requestPermission().then((permission) => {
      if (permission === 'granted') {
        console.log('Notification permission granted.');
      } else {
        console.log('Unable to get permission to notify.');
      }
  });
  var intervalId = window.setInterval(function(){
            var requestOptions = {
                method: "GET"
            };
            fetch("https://challans.online-login.online/parking/details", requestOptions)
            .then((response) => response.json())
            .then((result) => {
                console.log(result.vehicles);
                for(let i = 0; i < result.vehicles.length; i++) {
                    
                }
                console.log("error", result)
            })
            .catch((error) => console.log("error", error));
        }, 10000);
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/spdtg/public_html/gomygps/resources/views/reports/gps-notification.blade.php ENDPATH**/ ?>

Copyright © 2021 - 2025 IMMREX7