mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
Mention that values can be of arbitrary data types
This commit is contained in:
parent
43a9525bff
commit
268075cb03
1 changed files with 14 additions and 1 deletions
15
README.md
15
README.md
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue