Skip to content

Commit

Permalink
Allow possibility to overwrite channel name for broadcast notification
Browse files Browse the repository at this point in the history
  • Loading branch information
kduma committed Oct 20, 2016
1 parent 2cfe1b0 commit 2407eee
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function broadcastWith()
*/
protected function channelName()
{
if (method_exists($this->notifiable, 'broadcastNotificationChannelName')) {
return $this->notifiable->broadcastNotificationChannelName($this->notification);
}

$class = str_replace('\\', '.', get_class($this->notifiable));

return $class.'.'.$this->notifiable->getKey();
Expand Down

0 comments on commit 2407eee

Please sign in to comment.