From 53f912594621400452c9db86769fc50eab7f92e2 Mon Sep 17 00:00:00 2001 From: Chris Chapman <42548502+ccchapman@users.noreply.github.com> Date: Wed, 20 Jul 2022 13:19:11 -0700 Subject: [PATCH] Update data prefix (#181) `data.` is not working for me as a prefix. I had to use `data->`. This is consistent with the Laravel docs. Not sure if I'm missing something? https://laravel.com/docs/9.x/queries#json-where-clauses --- source/docs/v3/tenants.blade.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/docs/v3/tenants.blade.md b/source/docs/v3/tenants.blade.md index daa8ee4..c85acdd 100644 --- a/source/docs/v3/tenants.blade.md +++ b/source/docs/v3/tenants.blade.md @@ -99,12 +99,12 @@ public static function getDataColumn(): string Note that querying data inside the `data` column with `where()` will require that you do for example: ```php -where('data.foo', 'bar') +where('data->foo', 'bar') ``` The data column is encoded/decoded only on model retrieval and saving. -Also a good rule of thumb is that when you need to query the data with `WHERE` clauses, it should have a dedicated column. This will improve performance and you won't have to think about the `data.` prefixing. +Also a good rule of thumb is that when you need to query the data with `WHERE` clauses, it should have a dedicated column. This will improve performance and you won't have to think about the `data->` prefixing. ## Running commands in the tenant context {#running-commands-in-the-tenant-context}