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

Mention that values can be of arbitrary data types

This commit is contained in:
Samuel Štancl 2019-02-11 19:42:27 +01:00 committed by GitHub
parent 43a9525bff
commit 268075cb03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,7 +296,20 @@ tenancy()->put(['key1' => 'value1', 'key2' => 'value2']);
tenancy()->put(['key1' => 'value1', 'key2' => 'value2'], null, $uuid);
```
Note that `$key` has to be a string or an array with string keys.
Note that `$key` has to be a string or an array with string keys. The value(s) can be of any data type. Example with arrays:
```php
>>> tenant()->put('foo', ['a' => 'b', 'c' => 'd']);
=> [ // put() returns the supplied value(s)
"a" => "b",
"c" => "d",
]
>>> tenant()->get('foo');
=> [
"a" => "b",
"c" => "d",
]
```
## Database