maximilienGilet / notification-bundle

A simple Symfony bundle to notify user
https://packagist.org/packages/mgilet/notification-bundle
MIT License
107 stars 58 forks source link

Hello #76

Closed jorgeale90 closed 3 years ago

jorgeale90 commented 4 years ago

I have this error, if you could help me

Too few arguments to function Mgilet\NotificationBundle\Twig\NotificationExtension::countNotifications(), 0 passed in D:\Datos\xampp7\htdocs\SIBHP\var\cache\dev\twig\9a\9adaa1539f219a41e1ccbdefba3dfe8d988e67b798e7dbc8adda16cf97849646.php on line 96 and exactly 1 expected

maximilienGilet commented 4 years ago

Hi @jorgeale90

You need to pass the notifiable entity.

i.e. : to count notifications for a User, you need to pass the user object to the twig function

IndyDevGuy commented 4 years ago

Also you should try clearing your cache after you do the above comment. Looks like the error is coming from a generated cache file.

maximilienGilet commented 3 years ago

Please reopen this if the issue is still not fixed