-
When using the
Is there another way to apply the TLDR: Landlord model events being broadcast expect tenant scoping? How can I prevent that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I ended up doing this: <?php
namespace App\Services\Tenancy;
use Illuminate\Database\Eloquent\BroadcastableModelEventOccurred;
use Spatie\Multitenancy\Jobs\NotTenantAware;
class LandlordBroadcastableModelEvents extends BroadcastableModelEventOccurred implements NotTenantAware {} Any landlord model that needs to broadcast: protected function newBroadcastableEvent(string $event): BroadcastableModelEventOccurred
{
return new LandlordBroadcastableModelEvents(
$this, $event
);
} |
Beta Was this translation helpful? Give feedback.
I ended up doing this:
Any landlord model that needs to broadcast: