2023-08-25 00:23:38 +02:00
|
|
|
export default function (siteName, reloadCallback) {
|
|
|
|
return {
|
|
|
|
startListener: function () {
|
2023-10-16 15:41:37 +02:00
|
|
|
window.Echo.channel(siteName).listen('\\App\\Lib\\Events\\ReloadTriggered', () => reloadCallback());
|
2023-08-25 00:23:38 +02:00
|
|
|
},
|
|
|
|
stopListener() {
|
|
|
|
window.Echo.leave(siteName);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|