Uncaught ReferenceError: Echo не определено, laravel 9 Как я могу решить эту проблему Laravel echo и vitePhp

Кемеровские программисты 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]
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»