Replies: 1 comment 1 reply
-
This still isn't fixed? Is it intended or could you perhaps open a PR to suggest that fix? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using the latest 7.x branch i noticed that notifications ignore broadcastType() when it saves them to the datase. All i had to do was to edit
buildPayload()
in.../vendor/laravel/framework/src/Illuminate/Notifications/Channels/DatabaseChannel.php
to have this line:'type' => method_exists($notification, 'broadcastType') ? $notification->broadcastType() : get_class($notification),
. Now it correctly saves my desired notification type as 'myCustomBlah' instead of 'App\Notifications\MyCustomBlah'. This becomes really handy when we start using structured event names with dot or colon notation. It is not just human readable, but really useful for custom database queries.Beta Was this translation helpful? Give feedback.
All reactions