As per Laravel Docs, the Database Channel can use toDatabase and/or toArray.
In our case, one of our broadcastable notifications had these methods separated, and later had broadcasting removed, leaving behind toDatabase(), but removing toArray(). Although the functionality still works in Laravel, it causes a break in Clockwork.
This PR checks the notification and only calls the first method that exists.
EDIT: also just learned the same of toBroadcast(). Committed a fix for that too.
As per Laravel Docs, the Database Channel can use toDatabase and/or toArray.
In our case, one of our broadcastable notifications had these methods separated, and later had broadcasting removed, leaving behind toDatabase(), but removing toArray(). Although the functionality still works in Laravel, it causes a break in Clockwork.
This PR checks the notification and only calls the first method that exists.
EDIT: also just learned the same of toBroadcast(). Committed a fix for that too.