engelsystem/includes/pages/user_messages.php

15 lines
292 B
PHP
Raw Normal View History

2011-06-02 21:38:19 +02:00
<?php
2015-12-29 18:13:05 +01:00
use Engelsystem\Controllers\MessagesController;
2013-11-25 21:04:58 +01:00
2017-01-03 03:22:48 +01:00
/**
* @return string
*/
2017-01-02 03:57:23 +01:00
function user_unread_messages()
{
$count = app()->make(MessagesController::class)
->numberOfUnreadMessages();
2017-01-03 03:22:48 +01:00
return $count > 0 ? ' <span class="badge bg-danger">' . $count . '</span>' : '';
2011-06-02 21:38:19 +02:00
}