1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:54:04 +00:00

DB transactions

This commit is contained in:
Samuel Štancl 2019-09-21 13:27:26 +02:00
parent a5a9f47eaa
commit 46609c5b0d
2 changed files with 27 additions and 20 deletions

View file

@ -111,13 +111,16 @@ class Tenant implements ArrayAccess
return static::new()->withDomains((array) $domains)->withData($data)->save();
}
protected function persisted($persisted = null)
/**
* DO NOT CALL THIS METHOD FROM USERLAND UNLESS YOU KNOW WHAT YOU ARE DOING.
* Set $persisted.
*
* @param bool $persisted
* @return self
*/
public function persisted(bool $persisted): self
{
if (gettype($persisted) === 'boolean') {
$this->persisted = $persisted;
return $this;
}
$this->persisted = $persisted;
return $this;
}