File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -573,4 +573,36 @@ When using full text search, some restrictions happens to the query:
573573| ` filters.type ` | Not allowed |
574574| ` filters.nested ` | Not allowed |
575575| ** Sorts** | |
576- | ` sorts.field ` | take scout fields instead of fields in resource detail |
576+ | ` sorts.field ` | take scout fields instead of fields in resource detail |
577+
578+
579+ #### Text search with trash
580+
581+ Because the Laravel Scout Builder is not built the same as the Eloquent one, ` withTrashed ` instruction is not a scope
582+ anymore and work differently:
583+
584+ ``` json
585+ // (POST) api/posts/search
586+ {
587+ "search" : {
588+ "text" : {
589+ "value" : " my text search" ,
590+ "trashed" : " with"
591+ }
592+ }
593+ }
594+ ```
595+
596+ or for ` onlyTrashed ` :
597+
598+ ``` json
599+ // (POST) api/posts/search
600+ {
601+ "search" : {
602+ "text" : {
603+ "value" : " my text search" ,
604+ "trashed" : " only"
605+ }
606+ }
607+ }
608+ ```
You can’t perform that action at this time.
0 commit comments