Кемеровские программисты php общаются здесь
-
Anonymous
Uncaught ReferenceError: Echo не определено, laravel 9 Как я могу решить эту проблему Laravel echo и vite
Сообщение
Anonymous »
main.blade.php
Код: Выделить всё
@if (Auth::check())
var post_userId = {{ Auth::user()->id }};
Echo.private(`real-notification.${post_userId}`)
.listen('CommentNotification', (data) => {
var notificationsWrapper = $('.alert-dropdown');
var notificationsToggle = notificationsWrapper.find('a[data-bs-toggle]');
var notificationsCountElem = notificationsToggle.find('span[data-count]');
var notificationsCount = parseInt(notificationsCountElem.text());
var notifications = notificationsWrapper.find('div.alert-body');
var existingNotifications = notifications.html();
var newNotificationHtml = '[url=#]\
\
Подробнее здесь: [url]https://stackoverflow.com/questions/78563872/uncaught-referenceerror-echo-is-not-defined-laravel-9-how-can-i-solve-this-iss[/url]
1717247132
Anonymous
main.blade.php[b][code]
@if (Auth::check())
var post_userId = {{ Auth::user()->id }};
Echo.private(`real-notification.${post_userId}`)
.listen('CommentNotification', (data) => {
var notificationsWrapper = $('.alert-dropdown');
var notificationsToggle = notificationsWrapper.find('a[data-bs-toggle]');
var notificationsCountElem = notificationsToggle.find('span[data-count]');
var notificationsCount = parseInt(notificationsCountElem.text());
var notifications = notificationsWrapper.find('div.alert-body');
var existingNotifications = notifications.html();
var newNotificationHtml = '[url=#]\
\
Подробнее здесь: [url]https://stackoverflow.com/questions/78563872/uncaught-referenceerror-echo-is-not-defined-laravel-9-how-can-i-solve-this-iss[/url]