maknz / slack

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
BSD 2-Clause "Simplified" License
1.17k stars 204 forks source link

A facade root has not been set in Laravel 5.4 #84

Open batmanmaxx opened 7 years ago

batmanmaxx commented 7 years ago

I really could use some help with this one.

I'm using https://github.com/maknz/slack without issue when using SYNC (queue).

When I move to production w/ REDIS queue the code does not work.

A controller fires an event. The event listener fires and calls the code, i.e.

Slack::setDefaultUsername($username);

However, I get the following error in my logs which is a result of an exception being thrown "A facade root has not been set."

[2017-02-16 04:44:26] production.WARNING: AnalyticsService failed to notify to Slack. {"message":"A facade root has not been set."}

Can somebody help me understand what "A facade root has not been set." means and why this issue is only happening when I use REDIS versus SYNC?

Thank you very much in advance!