mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 20:54:04 +00:00
DB transactions
This commit is contained in:
parent
a5a9f47eaa
commit
46609c5b0d
2 changed files with 27 additions and 20 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue