File: D:/HostingSpaces/SBogers10/helder.komma.pro/app/Komma/Shop/Catalog/catalogRoutes.php
<?php
use App\Komma\Shop\Catalog\Kms\CatalogService;
Route::group(['middleware' => ['auth']], function () {
Route::get('kms/catalog/index', CatalogService::class . '@index'); //Note that this route hits a service. This is expected as it is hit from an artisan command and a future "index" button in the kms.
});
Route::get('/search', CatalogService::class . '@search')->name('catalog.search');
Route::get('/kms/catalog/reindexSearch', function () {
//Saves all models so that they will be re-indexed in the search databases again.
CatalogService::reIndexSearch();
echo 'Done!';
});