File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ composer.lock
5
5
.DS_Store
6
6
Thumbs.db
7
7
.idea
8
+ .phpunit.result.cache
Original file line number Diff line number Diff line change @@ -148,6 +148,15 @@ Or you can pass a searchable model argument:
148
148
149
149
` php artisan scout:status "App\Models\Post" `
150
150
151
+ If your models are not in the default location ` app ` or one of its subdirectories, you may set the ` modelPath ` option
152
+ ``` php
153
+ // config/scout.php
154
+ 'tntsearch' => [
155
+ // ...
156
+ 'modelPath' => 'models',
157
+ ],
158
+ ```
159
+
151
160
![ Image of Scout Status Command] ( https://teamtnt.github.io/img/scout_status_single_new.png )
152
161
153
162
## Constraints
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Console \Command ;
6
6
use Illuminate \Contracts \Events \Dispatcher ;
7
+ use Symfony \Component \Finder \Finder ;
7
8
use TeamTNT \TNTSearch \Exceptions \IndexNotFoundException ;
8
- use TeamTNT \TNTSearch \Indexer \TNTIndexer ;
9
9
use TeamTNT \TNTSearch \TNTSearch ;
10
- use Illuminate \Support \Facades \Schema ;
11
- use Symfony \Component \Finder \Finder ;
12
10
13
11
class StatusCommand extends Command
14
12
{
@@ -89,7 +87,9 @@ private function getProjectClasses(): array
89
87
{
90
88
91
89
if (self ::$ declaredClasses === null ) {
92
- $ configFiles = Finder::create ()->files ()->name ('*.php ' )->notName ('*.blade.php ' )->in (app ()->path ());
90
+ $ configFiles = Finder::create ()->files ()
91
+ ->name ('*.php ' )->notName ('*.blade.php ' )
92
+ ->in (config ('scout.tntsearch.modelPath ' , app ()->path ()));
93
93
94
94
foreach ($ configFiles ->files () as $ file ) {
95
95
try {
You can’t perform that action at this time.
0 commit comments