HomeAccounting

Форк
0
55 строк · 1.7 Кб
1

2
window._ = require('lodash');
3
window.Popper = require('popper.js').default;
4

5
/**
6
 * We'll load jQuery and the Bootstrap jQuery plugin which provides support
7
 * for JavaScript based Bootstrap features such as modals and tabs. This
8
 * code may be modified to fit the specific needs of your application.
9
 */
10

11
try {
12
    window.$ = window.jQuery = require('jquery');
13

14
    require('bootstrap');
15
} catch (e) {}
16

17
/**
18
 * We'll load the axios HTTP library which allows us to easily issue requests
19
 * to our Laravel back-end. This library automatically handles sending the
20
 * CSRF token as a header based on the value of the "XSRF" token cookie.
21
 */
22

23
window.axios = require('axios');
24

25
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
26

27
/**
28
 * Next we will register the CSRF Token as a common header with Axios so that
29
 * all outgoing HTTP requests automatically have it attached. This is just
30
 * a simple convenience so we don't have to attach every token manually.
31
 */
32

33
let token = document.head.querySelector('meta[name="csrf-token"]');
34

35
if (token) {
36
    window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
37
} else {
38
    console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
39
}
40

41
/**
42
 * Echo exposes an expressive API for subscribing to channels and listening
43
 * for events that are broadcast by Laravel. Echo and event broadcasting
44
 * allows your team to easily build robust real-time web applications.
45
 */
46

47
// import Echo from 'laravel-echo'
48

49
// window.Pusher = require('pusher-js');
50

51
// window.Echo = new Echo({
52
//     broadcaster: 'pusher',
53
//     key: process.env.MIX_PUSHER_APP_KEY,
54
//     cluster: process.env.MIX_PUSHER_APP_CLUSTER,
55
//     encrypted: true
56
// });
57

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.