Closed iaditya closed 8 years ago
The docs are wrong, you should use getNotifications
. Sorry for being not clear enough!
PS. You should use debug()
instead of dump()
;)
So how do we get to read/unread notifications?
Second parameter is used for the state (true
, or false
)
Ya . it's ok But , when we create a notification, it stores the state's value 1 not 0.
Thanks
That means it isn't read yet...
It adds a new notification but the state value is 1.
and for unread notification -
$this->Notifier->countNotifications($userid, false);
got value 0;
and
$this->Notifier->countNotifications($userid, true);
// it's working
got value - (number of notifications)
Hey , Please tell me on thing , state value = 1 means true ?
And what is the logic behind changing the value of state in notifications, so we get to read/unread notifications? How does value changed?
Once again thank you.
Here is my code -
dump($this->Notifier->allNotificationList($userid, true));
got Error :