Skip to content

Instantly share code, notes, and snippets.

@lemesdaniel
Created August 11, 2015 20:36
Show Gist options
  • Save lemesdaniel/99c3c190667715bdac03 to your computer and use it in GitHub Desktop.
Save lemesdaniel/99c3c190667715bdac03 to your computer and use it in GitHub Desktop.
PublishToFanoutEvent.php
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class PublishToFanoutEvent implements ShouldBroadcast
{
use SerializesModels;
public $message;
public function __construct($message)
{
$this->message = $message;
}
public function broadcastOn()
{
return ['<channel>'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment