PHPackages                             ermakove/laravel-manticoresearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ermakove/laravel-manticoresearch

ActiveLibrary[Database &amp; ORM](/categories/database)

ermakove/laravel-manticoresearch
================================

An easy way to use the official ManticoreSearch client in your Laravel applications

1.6.3(3y ago)0117MITPHPPHP ^7.2|^8.0

Since Jun 8Pushed 3y agoCompare

[ Source](https://github.com/ermakove/laravel-manticoresearch)[ Packagist](https://packagist.org/packages/ermakove/laravel-manticoresearch)[ Docs](https://github.com/ermakove/laravel-manticoresearch)[ RSS](/packages/ermakove-laravel-manticoresearch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (7)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/ae42ab49e69ae03eb8c4e8d65202e1e297c4c32bd5bae0284d624bfc3256c4fc/68747470733a2f2f706f7365722e707567782e6f72672f6576696c667265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f762f737461626c65)](https://packagist.org/packages/evilfreelancer/laravel-manticoresearch)[![Total Downloads](https://camo.githubusercontent.com/425e2cd914e3f14f086df605e94e2de380fbb41dd2c279375fbcdadb6520ec0a/68747470733a2f2f706f7365722e707567782e6f72672f6576696c667265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f646f776e6c6f616473)](https://packagist.org/packages/evilfreelancer/laravel-manticoresearch)[![Build Status](https://camo.githubusercontent.com/e7a4d40ff1d2c543d0bd4ed94dc742755d4423620aced810d8e0fbb3ffd83d28/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4576696c467265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/EvilFreelancer/laravel-manticoresearch/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/331dd994653240c8634da6c6923b0ab72d4346320af62b61b8f4bf97793550d2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4576696c467265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/EvilFreelancer/laravel-manticoresearch/?branch=master)[![Code Climate](https://camo.githubusercontent.com/a89997c830c55f96f0534a49ed01b00bec9975c64171d3694ce15143d24947a8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4576696c467265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f6261646765732f6770612e737667)](https://codeclimate.com/github/EvilFreelancer/laravel-manticoresearch)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d4a5cbbf2945496c13177362b0b67ad0298b28066a187b7e46eba299cc1ef5c2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4576696c467265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/EvilFreelancer/laravel-manticoresearch/?branch=master)[![License](https://camo.githubusercontent.com/ac6a4e4494525ac42c55e32a4357981a612a77bc2a2ab4653b743f54c1af1f85/68747470733a2f2f706f7365722e707567782e6f72672f6576696c667265656c616e6365722f6c61726176656c2d6d616e7469636f72657365617263682f6c6963656e7365)](https://packagist.org/packages/evilfreelancer/laravel-manticoresearch)

Laravel ManticoreSearch plugin
==============================

[](#laravel-manticoresearch-plugin)

An easiest way to use the [official ManticoreSearch client](https://github.com/manticoresoftware/manticoresearch-php)in your Laravel or Lumen applications.

```
composer require evilfreelancer/laravel-manticoresearch
```

- [Post install](#Post-install)
    - [Laravel](#Laravel)
    - [Lumen](#Lumen)
- [How to use](#How-to-use)
- [Logging](#Logging)
- [Links](#Links)

Post install
------------

[](#post-install)

### Laravel

[](#laravel)

The package's service provider will automatically register its service provider.

Publish the configuration file:

```
php artisan vendor:publish --provider="ManticoreSearch\Laravel\ServiceProvider"
```

#### Alternative configuration method via .env file

[](#alternative-configuration-method-via-env-file)

After you publish the configuration file as suggested above, you may configure ManticoreSearch by adding the following to your application's `.env` file (with appropriate values):

```
MANTICORESEARCH_HOST=localhost
MANTICORESEARCH_PORT=9200
MANTICORESEARCH_TRANSPORT=Http
MANTICORESEARCH_USER=
MANTICORESEARCH_PASS=
```

#### All available environments variables

[](#all-available-environments-variables)

NameDefault valueDescriptionMANTICORESEARCH\_CONNECTIONdefaultName of default connectionMANTICORESEARCH\_HOSTlocalhostAddress of host with Manticore serverMANTICORESEARCH\_PORT9308Port number with REST serverMANTICORESEARCH\_TRANSPORTHttpType of transport, can be: Http, Https, PhpHttp or your custom driverMANTICORESEARCH\_USERUsernameMANTICORESEARCH\_PASSPasswordMANTICORESEARCH\_TIMEOUT5Timeout between requestsMANTICORESEARCH\_CONNECTION\_TIMEOUT1Timeout before connectionMANTICORESEARCH\_PROXYUrl of HTTP proxy serverMANTICORESEARCH\_PERSISTENTtrueDefine whenever connection is persistent or notMANTICORESEARCH\_RETRIES2Amount of retries if connection is lost### Lumen

[](#lumen)

If you work with Lumen, please register the service provider and configuration in `bootstrap/app.php`:

```
// Enable shortname of facade
$app->withFacades(true, [
    'ManticoreSearch\Laravel\Facade' => 'Facade',
]);

// Register Config Files
$app->configure('manticoresearch');

// Register Service Providers
$app->register(ManticoreSearch\Laravel\ServiceProvider::class);
```

Manually copy the configuration file to your application.

How to use
----------

[](#how-to-use)

The `ManticoreSearch` facade is just an entry point into the [ManticoreSearch client](https://github.com/manticoresoftware/manticoresearch-php), so previously you might have used:

```
require_once __DIR__ . '/vendor/autoload.php';

$config = ['host'=>'127.0.0.1', 'port'=>9308];
$client = new \Manticoresearch\Client($config);
$index  = new \Manticoresearch\Index($client);
$index->setName('movies');
```

Instead of these few lines above you can use single line solution:

```
$index = \ManticoreSearch::index('movies');
```

That will run the command on the default connection. You can run a command on any connection (see the [defaultConnection](https://github.com/EvilFreelancer/laravel-manticoresearch/blob/master/config/manticoresearch.php#L9)setting and [connections](https://github.com/EvilFreelancer/laravel-manticoresearch/blob/master/config/manticoresearch.php#L11)array in the configuration file).

```
$index   = \ManticoreSearch::connection('connectionName')->index($nameOfIndex);
$pq      = \ManticoreSearch::connection('connectionName')->pq();
$cluster = \ManticoreSearch::connection('connectionName')->cluster();
$indices = \ManticoreSearch::connection('connectionName')->indices();
$nodes   = \ManticoreSearch::connection('connectionName')->nodes();

// etc...
```

methods of the Client class:

```
\ManticoreSearch::connection('connectionName')->sql($params);
\ManticoreSearch::connection('connectionName')->replace($params);
\ManticoreSearch::connection('connectionName')->delete($params);

// etc...
```

Lumen users who aren't using facades will need to use dependency injection, or the application container in order to get the ManticoreSearch Index object:

```
// using injection:
public function handle(\ManticoreSearch\Laravel\Manager $manticoresearch)
{
    $manticoresearch->describe();
}

// using application container:
$manticoreSearch = $this->app('manticoresearch');
```

Of course, dependency injection and the application container work for Laravel applications as well.

Logging
-------

[](#logging)

Since the PHP client of the ManticoreSearch supports logging through PSR-compatible loggers, you can use them in the same way as presented in the [official documentation](https://github.com/manticoresoftware/manticoresearch-php/blob/master/docs/logging.md).

For example, you want to use the Monolog logger.

```
composer require monolog/monolog
```

By default, you need to write something like this:

```
$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');
```

But if you want to use the Monolog together with this library then you may simplify your code like this:

```
$logger = new \Monolog\Logger('name');
$logger->pushHandler(new \Monolog\Handler\StreamHandler('/my/log.file', Logger::INFO));

$index = \ManticoreSearch::connection('connectionName', $logger)->index('movies');
```

Testing
-------

[](#testing)

Just install dev requirements `composer install --dev`, then execute following command from root of this library:

```
./vendor/bin/phpunit
```

Links
-----

[](#links)

-
-

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~153 days

Recently: every ~184 days

Total

6

Last Release

1394d ago

Major Versions

0.9 → 1.0.02020-07-10

PHP version history (2 changes)0.9PHP ^7.2

1.6.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/44d093ded16705327fee319bb689f1bf632ae607dbbf857eaa768b46635e7bb4?d=identicon)[ermakove](/maintainers/ermakove)

---

Top Contributors

[![EvilFreelancer](https://avatars.githubusercontent.com/u/9089568?v=4)](https://github.com/EvilFreelancer "EvilFreelancer (40 commits)")[![ermakove](https://avatars.githubusercontent.com/u/1975343?v=4)](https://github.com/ermakove "ermakove (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ermakove-laravel-manticoresearch/health.svg)

```
[![Health](https://phpackages.com/badges/ermakove-laravel-manticoresearch/health.svg)](https://phpackages.com/packages/ermakove-laravel-manticoresearch)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
