From e8f2e626458b3b6d88dab3716767f7962023b25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 21 Jan 2019 18:27:02 +0100 Subject: [PATCH] Add more documentation for get() and put() --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 98f0d855..3eb6082b 100644 --- a/README.md +++ b/README.md @@ -302,10 +302,20 @@ If your cache driver is Redis and you don't want to use AOF with it, run two Red Along with the tenant and database info, you can store your own data in the storage. You can use: +```php +get (string|array $key, string $uuid = null) // $uuid defaults to the current tenant's UUID +put (string|array $key, mixed $value = null, string $uuid = null) // if $key is array, make sure $value is null +``` + ```php tenancy()->get($key); +tenancy()->get($key, $uuid); +tenancy()->get(['key1', 'key2']); tenancy()->put($key, $value); tenancy()->set($key, $value); // alias for put() +tenancy()->put($key, $value, $uuid); +tenancy()->put(['key1' => 'value1', 'key2' => 'value2']); +tenancy()->put(['key1' => 'value1', 'key2' => 'value2'], null, $uuid); ``` Note that `$key` has to be a string.