File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ In your `config/scout.php` add:
63
63
],
64
64
```
65
65
66
+ The ` asYouType ` option can be set per model basis, see example bellow
67
+
66
68
## Usage
67
69
68
70
After you have installed scout and the TNTSearch driver, you need to add the
@@ -80,6 +82,8 @@ use Laravel\Scout\Searchable;
80
82
class Post extends Model
81
83
{
82
84
use Searchable;
85
+
86
+ public $asYouType = true;
83
87
84
88
/**
85
89
* Get the indexable data array for the model.
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ protected function performSearch(Builder $builder)
128
128
$ this ->tnt ->selectIndex ("{$ index }.index " );
129
129
130
130
$ this ->builder = $ builder ;
131
+ $ this ->tnt ->asYouType = $ builder ->model ->asYouType ?: false ;
131
132
132
133
return $ this ->tnt ->search ($ builder ->query , $ limit );
133
134
}
You can’t perform that action at this time.
0 commit comments