You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-14Lines changed: 39 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@
4
4
[](https://packagist.org/packages/ginkelsoft/laravel-encrypted-search-index)
If you plan to use the Elasticsearch integration, make sure an Elasticsearch instance (version **8.x or newer**) is running and accessible at the host defined in your `.env` file.
175
+
169
176
Then add a unique pepper to your `.env` file:
170
177
171
178
```
@@ -196,21 +203,20 @@ return [
196
203
197
204
### Model Setup
198
205
206
+
If `auto_index_encrypted_casts` is enabled in the configuration (default: **true**),
207
+
all model fields that use an `encrypted:` cast will be automatically indexed for exact search,
208
+
even if they are not explicitly listed in `$encryptedSearch`.
209
+
210
+
You can also use PHP attributes to control search behavior per field:
211
+
199
212
```php
200
-
use Illuminate\Database\Eloquent\Model;
201
-
use Ginkelsoft\EncryptedSearch\Traits\HasEncryptedSearchIndex;
213
+
use Ginkelsoft\EncryptedSearch\Attributes\EncryptedSearch;
0 commit comments