jeudi 15 août 2019

Send notification from abstract class' static method in Laravel 5.8?

I'm trying to send a Slack notification using Laravel 5.8, everything worked well with my other classes but I now need to send a notification from a static method, however I can't call notify() from a static method:

$this->notify(new ErrorOccured($errorMessage));

and we can't call a non-static method from a static method like such: self::notify();

Is there another way I don't know of, which permits this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire