PHP code example of callwoola / search-suggest

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

    

callwoola / search-suggest example snippets


$suggest = new Suggest;
$result = $suggest->push([
	'name' => 'untitle',
	'data' => [
		...
	]
]);

$suggest = new Suggest;
$result = $suggest->search('word');

composer update -v

'Callwoola\SearchSuggest\Provider\SearchProvider',

'SearchSuggest' => 'Callwoola\SearchSuggest\Provider\Facades\Suggest',

    'suggest' => [
        'database' => {{redis_database_number}}
    ],