mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:04:03 +00:00
getMany now returns only values
This commit is contained in:
parent
fbd600a670
commit
405e3148bd
1 changed files with 2 additions and 5 deletions
|
|
@ -80,13 +80,10 @@ class Tenant extends Model
|
||||||
return $this->$key ?? $this->getFromData($key) ?? null;
|
return $this->$key ?? $this->getFromData($key) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @todo In v2, this should return an associative array. */
|
||||||
public function getMany(array $keys): array
|
public function getMany(array $keys): array
|
||||||
{
|
{
|
||||||
return array_reduce($keys, function ($keys, $key) {
|
return array_map([$this, 'get'], $keys);
|
||||||
$keys[$key] = $this->get($key);
|
|
||||||
|
|
||||||
return $keys;
|
|
||||||
}, []);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function put(string $key, $value)
|
public function put(string $key, $value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue