PHP code example of alapi / hyperf-meilisearch

1. Go to this page and download the library: Download alapi/hyperf-meilisearch library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alapi / hyperf-meilisearch example snippets


return [
    'default' => env('SCOUT_ENGINE',),#修改配置为 meilisearch
    'chunk' => [
        'searchable' => 500,
        'unsearchable' => 500,
    ],
    'prefix' => env('SCOUT_PREFIX', ''),
    'soft_delete' => false,
    'concurrency' => 100,
    'engine' => [
         ...
        'meilisearch' => [ # 增加 meilisearch 引擎
            'driver' => \Alapi\Meilisearch\MeilisearchProvider::class,
        ]
    ],
];

php bin/hyperf.php vendor:publish alapi/hyperf-meilisearch