edvinaskrucas / notification

Notification package for Laravel
MIT License
526 stars 98 forks source link

Unable to get it working on Laravel 4.1 and TwigBridge 0.5.2 #22

Closed starkyz closed 10 years ago

starkyz commented 10 years ago

Hello, I'm experiencing some problems with using this on Laravel 4.1.18. By the way, I'm using twigbridge, but the problem starts before I'm trying to display notifications. When I just copy&paste the given example: "Notification::container('myContainer')->info('Info message')->error('Error message');" I get this error "Call to a member function error() on a non-object", so I guess the problem is not connected with twigbridge usage. And I'm unable to get notifications by call "Notification::showAll();" if notifications were set to container. If I'm using, for example, "Notification::infoInstant()", it works. Something is wrong with containers.

Azirius commented 10 years ago

I too cannot get containers to work either. They only work when using Notification::container('myContainer'){type}Instant();

So I don't believe it to be an issue with TwigBridge, but the package itself.

edvinaskrucas commented 10 years ago

Did you described container in settings?

Azirius commented 10 years ago

Perfect. That worked. Sorry I didn't read the config thoroughly. Though, in my defence, it wasn't 100% obvious that was necessary in the first place.

I had to define a default template and default types for the new container. This seems somewhat cumbersome, in my opinion. It'd be nice if they could just pull in the regular defaults on the fly. But I'm just finicky like that. If it bothered me that much I could attempt to patch in such functionality.

Anywho.

Thank you very much for suggesting that anyway, glad to have it working :+1:

edvinaskrucas commented 10 years ago

Goog to hear that it helped. Sorry for long delay :) I will try to spend some time for new features and this one will be included, I hope I will find some time soon! :)