mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:34:03 +00:00
phpstan, global_cache, resolver improvements, InitializationHelpers trait
This commit is contained in:
parent
fd65cf1754
commit
87212e5390
35 changed files with 170 additions and 231 deletions
19
src/Database/Concerns/InitializationHelpers.php
Normal file
19
src/Database/Concerns/InitializationHelpers.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Database\Concerns;
|
||||
|
||||
/**
|
||||
* @mixin \Stancl\Tenancy\Contracts\Tenant
|
||||
*/
|
||||
trait InitializationHelpers
|
||||
{
|
||||
public function enter(): void
|
||||
{
|
||||
tenancy()->initialize($this);
|
||||
}
|
||||
|
||||
public function leave(): void
|
||||
{
|
||||
tenancy()->end();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue