PHP code example of gitzaai / cnsearch

1. Go to this page and download the library: Download gitzaai/cnsearch 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/ */

    

gitzaai / cnsearch example snippets

bash
composer ssets:publish
php flarum cache:clear
bash
php flarum cnsearch:configure https://your-meilisearch.example --index=flarum_discussions
php flarum cache:clear
bash
php flarum cnsearch:configure https://your-meilisearch.example --key=replace_with_your_key --index=flarum_discussions
php flarum cache:clear
bash
php flarum cnsearch:reindex
bash
php flarum cnsearch:status
bash
php flarum cnsearch:search 中文关键词
bash
composer dump-autoload -o
php flarum cache:clear
php flarum cnsearch:reindex