edvinaskrucas / notification

Notification package for Laravel
MIT License
525 stars 99 forks source link

Notification now showing #57

Closed TheTechnoMan closed 9 years ago

TheTechnoMan commented 9 years ago

Hey,

for some reason it is not showing the added notifications. I am sure that it's not caused by the template, I think that it does not add it correctly. How can I check if it has been indeed added within the Controller itself?

Thanks!

edvinaskrucas commented 9 years ago

Could you post code sample?

TheTechnoMan commented 9 years ago

Basically just:

Notification::error('Error');
return redirect()->back();

And in the .blade template:

{!! Notification::group('info', 'success', 'error', 'warning')->showAll() !!}
TheTechnoMan commented 9 years ago

@edvinaskrucas Any idea? :(

edvinaskrucas commented 9 years ago

Hey, just tested your given code and it worked. Maybe you have invalid configuration for session?

TheTechnoMan commented 9 years ago

No, not really. Thats basically why I asked how I can check if the message has actually been added. I mean how can I fetch the messages inside the controller? ty

edvinaskrucas commented 9 years ago

Did you tried to use debugger?

TheTechnoMan commented 9 years ago

When I get the whole session data it does indeed show an entry for the message:

  "notifications_default_1" => "{"message":"The product has been updated!","format":"<blockquote class=\"success\"><i class=\"fa fa-check-circle-o\"><\/i> :message<\/blockquote>","type":"success","flashable":true,"alias":null,"position":null}"

Any idea why it does not output it?

Ty

edvinaskrucas commented 9 years ago

Which laravel version and package version you are using?