1
0
Fork 0
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:
Samuel Štancl 2019-09-04 16:53:01 +02:00 committed by GitHub
parent 6de9ee9421
commit f4421af6c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 1 deletions

View file

@ -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()});