diff --git a/published/config.stub b/published/config.stub index 082e8cc..0599722 100644 --- a/published/config.stub +++ b/published/config.stub @@ -66,4 +66,11 @@ return [ Sofa\ModelLocking\ModelLocked::class => null, Sofa\ModelLocking\ModelUnlocked::class => null, ], + + /* + |-------------------------------------------------------------------------- + | Queue where broadcasts are dispatched to. + |-------------------------------------------------------------------------- + */ + 'broadcast_queue' => null, ]; diff --git a/src/LockEvent.php b/src/LockEvent.php index 06a3722..bc2fb0b 100644 --- a/src/LockEvent.php +++ b/src/LockEvent.php @@ -21,6 +21,16 @@ public function __construct($model) $this->model = $model; } + /** + * Get the queue where broadcasts are dispatched to. + * + * @return string|null + */ + public function broadcastQueue() + { + return config('model_locking.broadcast_queue'); + } + /** * Get the channels the event should broadcast on. *