Give this a look https://laravel.com/docs/11.x/notifications#broadcast-notifications
And I think it was this one https://www.youtube.com/watch?v=yrL5eCMpqtc
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi!
Have created a application laravel 10.x and vue 2
I am using notification in my application. Must check if new notifications is present every 55 seconds
Today am am using in my vue compoent
mounted() {
console.log("NOTIFICATIONS MAUNTED 3");
//this.getNotifications();
this.interval = setInterval(
function () {
this.getNotifications();
}.bind(this),
55000
);
},
...
...
getNotifications() {
var _this = this;
axios
.get("getnotificationFlow", {
params: {
status: 5,
},
})
.then(function (response) {
_this.notifications = response.data.data.notfikikations;
_this.numbofnotif = _this.notifications.length;
console.log("Notifications here ");
})
.catch(function (error) {
console.log("Error getnotificationFlow :" + error);
})
.then(function () {});
},
Is there some better way to update my component -> notification NOT use setInterval ?
Please or to participate in this conversation.