1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:34:03 +00:00

Fire the newly created Tenancy events

This commit is contained in:
Samuel Štancl 2020-05-17 17:53:38 +02:00
parent b87c0bc9d2
commit dd44a3406d
3 changed files with 10 additions and 0 deletions

View file

@ -27,6 +27,8 @@ class Tenancy
return;
}
event(new Events\InitializingTenancy($this));
$this->tenant = $tenant;
$this->initialized = true;
@ -36,6 +38,8 @@ class Tenancy
public function end(): void
{
event(new Events\EndingTenancy($this));
if (! $this->initialized) {
return;
}