mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
Fix custom columns, add tests (#122)
* Fix custom columns & add test * Apply fixes from StyleCI
This commit is contained in:
parent
6de9ee9421
commit
f4421af6c5
3 changed files with 55 additions and 1 deletions
|
|
@ -90,7 +90,7 @@ class Tenant extends Model
|
|||
|
||||
public function put(string $key, $value)
|
||||
{
|
||||
if (\array_key_exists($key, $this->customColumns())) {
|
||||
if (\in_array($key, $this->customColumns())) {
|
||||
$this->update([$key => $value]);
|
||||
} else {
|
||||
$obj = \json_decode($this->{$this->dataColumn()});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue