0

我收到错误消息:

'不支持驱动程序 [tntsearch]'

当我发出 Artisan 命令时使用 Laravel Scout php artisan scout:import "App\Location"

php artisan -V => Laravel Framework 5.4.16

有没有其他人看到这个错误?

4

1 回答 1

0

你需要为 Laravel Scout 安装 TNTSearch Engine:

composer require teamtnt/laravel-scout-tntsearch-driver

添加服务提供者:

// config/app.php
'providers' => [
    // ...
    TeamTNT\Scout\TNTSearchScoutServiceProvider::class,
],

加载供应商配置

php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

添加SCOUT_DRIVER=tntsearch到您的.env文件
在您的config/scout.php添加中:

'tntsearch' => [
    'storage'  => storage_path(), //place where the index files will be stored
    'fuzziness' => env('TNTSEARCH_FUZZINESS', false),
    'fuzzy' => [
        'prefix_length' => 2,
        'max_expansions' => 50,
        'distance' => 2
    ],
    'asYouType' => false,
],
于 2017-04-04T11:55:28.617 回答