You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
It would be great if we could specify a mapping of classes to custom prefixes, or even use the morph map that eloquent already provides.
In addition, the notification type column in the database uses the notification's full class name. This becomes a pain to maintain because the notifications can no longer be moved around the application unless a migration is created to update the paths.
I don't think the type column is actually used anywhere to reconstruct the class, so maybe a type property can be added to the notification class as an override?
public $type = 'invoice-paid';
public function via($notifiable)
{
return ['broadcast', 'database'];
}
The text was updated successfully, but these errors were encountered:
@jlndk it works only for Broadcasting Events, not for notifications.
@fgambino you can define event name since v5.6.4 just return custom event name in broadcastType method of your notification. It was implemented in PR laravel/framework#23236
This issue as well as related #202 could be closed since all the questions which were raised here are solved.
Currently, all broadcast notifications construct the channel name like this:
It would be great if we could specify a mapping of classes to custom prefixes, or even use the morph map that eloquent already provides.
In addition, the notification
type
column in the database uses the notification's full class name. This becomes a pain to maintain because the notifications can no longer be moved around the application unless a migration is created to update the paths.I don't think the
type
column is actually used anywhere to reconstruct the class, so maybe atype
property can be added to the notification class as an override?The text was updated successfully, but these errors were encountered: