PHP code example of webregul / laravel-manticoresearch
1. Go to this page and download the library: Download webregul/laravel-manticoresearch 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/ */
webregul / laravel-manticoresearch example snippets
// using injection:
public function handle(\ManticoreSearch\Laravel\Manager $manticoresearch)
{
$manticoresearch->describe();
}
// using application container:
$manticoreSearch = $this->app('manticoresearch');
$logger = new \Monolog\Logger('name');
$logger->pushHandler(new \Monolog\Handler\StreamHandler('/my/log.file', Logger::INFO));
$config = ['host' => '127.0.0.1', 'port' => 9306];
$client = new \Manticoresearch\Client($config, $logger);
$index = new \Manticoresearch\Index($client);
$index->setName('movies');