I made a notification system. I wish I could, via Ajax, to call the function that allows me to display the number of unread notifications. There is the possibility, by browsing the website, you call the function every 10 seconds, for example, automatically. Thanks for your help. For now I have this code:
function notifications()
{
$.get("//localhost/laravel/public/index.php/new_notifications",
function(data)
{
data_parsed = JSON.parse(data);
if(data_parsed.length > 0)
{
//code
}
});
}