Closed mstnorris closed 10 years ago
+1
Does not work with Laravel 4.2.6. When Debugging is enabled in the Laravel App, it returns this Exception:
ErrorException (E_UNKNOWN) Declaration of Krucas\Notification\Collection::contains() should be compatible with Illuminate\Support\Collection::contains($value)
I think there's a problem with namespaces. The used call is Notification::showAll()
I am upgrading a site I had built in Laravel 4.0 to Laravel 4.2 and I also ran into the same error as MisterMike, and the call I am using is also {{ Notification::showAll() }}. If I remove those calls, everything else in the site seems to be working and properly updated.
Was fine with 4.2.6 but when I upgrade to 4.2.7 I get the same error.
I get the same error for Laravel 4.2.7 after upgrade.
I too am facing same issue, did anyone got a fix for this??
@rahulmkhj in message above mikedfunk Fix worked for me https://github.com/mikedfunk/notification/commit/1cff280894791c40114d998502f70a9075bbcf43
This still looks to be busted for us, the only way to fix is to manually modify the file ourselves which will be lost if there's any new releases that don't include the fix for this
@duellsy I had applied this fix manually and it worked for me, meanwhile a better fix got merged into the master branch (https://github.com/edvinaskrucas/notification/pull/33), and now I can simply get a fixed version through composer, just make sure you're requiring version 3.* of this package in your composer.json
@diZturbio ahh awesome, didn't see the v3.0 release, thanks.
Changing to 3.* worked for me, thanks!
I am using essentially the same code from two projects. One of them doesn't work; and after a lot of trial and error as to why it doesn't - (the notifications do not show, and there are no errors) I have to conclude that it is because the latter project which doesn't show the notifications is running Laravel 4.2.