stop status event

This commit is contained in:
Andras Bacsai
2023-12-08 13:07:42 +01:00
parent 4071e096bc
commit 205995cabe
3 changed files with 12 additions and 8 deletions

View File

@@ -16,6 +16,12 @@ class ServiceStatusChanged implements ShouldBroadcast
public $userId;
public function __construct($userId = null)
{
if (is_null($userId)) {
$userId = auth()->user()->id ?? null;
}
if (is_null($userId)) {
throw new \Exception("User id is null");
}
$this->userId = $userId;
}