PHPackages                             webregul/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. [API Development](/categories/api)
4. /
5. webregul/laravel-manticoresearch

ActiveLibrary[API Development](/categories/api)

webregul/laravel-manticoresearch
================================

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

v2.0(2y ago)0314MITPHPPHP ^7.2|^8.0

Since May 12Pushed 2y agoCompare

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

READMEChangelog (2)Dependencies (8)Versions (3)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.

Fork from evilfreelancer/laravel-manticoresearch with Laravel 10 support

```
composer require webregul/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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~48 days

Total

2

Last Release

1047d ago

Major Versions

1.6.3 → v2.02023-06-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d081a186978d91981ca1f659d5e0ddf67b741edab92cfb994efb3cd9f27708e?d=identicon)[WebRegul](/maintainers/WebRegul)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[neuron-core/neuron-laravel

Official Neuron AI Laravel SDK.

10710.0k](/packages/neuron-core-neuron-laravel)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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