Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

Commit

Permalink
Fix keeping records indexable
Browse files Browse the repository at this point in the history
There is no need to attempt to index every single searchable model on every single eloquent save / delete
  • Loading branch information
Liam-PVTL committed Jan 14, 2020
1 parent 961cbe5 commit acdad88
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/Commands/GenerateSearchIndices.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ public function handle()
if (!file_exists(config_path() . '/scout.php')) {
Artisan::call("vendor:publish", ['--provider' => 'Laravel\Scout\ScoutServiceProvider']);
}

$searchableModels = SearchController::getSearchableModels();

foreach ($searchableModels as $model) {
if (!class_exists($model)) {
continue;
}

Artisan::call("scout:import", ['model' => $model]);
}

return true;
}
}

0 comments on commit acdad88

Please sign in to comment.