bootstrap.js (1248B)
1 /** 2 * We'll load the axios HTTP library which allows us to easily issue requests 3 * to our Laravel back-end. This library automatically handles sending the 4 * CSRF token as a header based on the value of the "XSRF" token cookie. 5 */ 6 7 import axios from 'axios'; 8 window.axios = axios; 9 10 window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 11 12 /** 13 * Echo exposes an expressive API for subscribing to channels and listening 14 * for events that are broadcast by Laravel. Echo and event broadcasting 15 * allows your team to easily build robust real-time web applications. 16 */ 17 18 // import Echo from 'laravel-echo'; 19 20 // import Pusher from 'pusher-js'; 21 // window.Pusher = Pusher; 22 23 // window.Echo = new Echo({ 24 // broadcaster: 'pusher', 25 // key: import.meta.env.VITE_PUSHER_APP_KEY, 26 // cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1', 27 // wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`, 28 // wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80, 29 // wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, 30 // forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https', 31 // enabledTransports: ['ws', 'wss'], 32 // });