PHPackages                             larva/laravel-scout-sphinxsearch - 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. [Search &amp; Filtering](/categories/search)
4. /
5. larva/laravel-scout-sphinxsearch

ActiveLibrary[Search &amp; Filtering](/categories/search)

larva/laravel-scout-sphinxsearch
================================

Laravel Scout Sphinx Driver

1.0.1(5y ago)137MITPHP

Since Jul 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/larvacent/laravel-scout-sphinxsearch)[ Packagist](https://packagist.org/packages/larva/laravel-scout-sphinxsearch)[ RSS](/packages/larva-laravel-scout-sphinxsearch/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Laravel Scout Sphinx Driver
===========================

[](#laravel-scout-sphinx-driver)

Installation
------------

[](#installation)

### Composer

[](#composer)

Use the following command to install package via composer

```
composer require larva/laravel-scout-sphinxsearch
```

### Configuration

[](#configuration)

Publish the Scout configuration using the `vendor:publish` Artisan command.

```
php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
```

This command will publish the scout.php configuration file to your config directory. Edit this file to set 'sphinxsearch' as a Scout driver:

```
'driver' => env('SCOUT_DRIVER', 'sphinxsearch'),
```

And add default Sphinx connection options

```
    'sphinxsearch' => [
        'host' => env('SPHINX_HOST', 'localhost'),
        'port' => env('SPHINX_PORT', '9306'),
        'socket' => env('SPHINX_SOCKET'),
        'charset' => env('SPHINX_CHARSET'),
    ],
```

Override these variables in your .env file if need.

Usage
-----

[](#usage)

- Add the `Laravel\Scout\Searchable` trait to the model you would like to make searchable.
- Customize index name and searchable data for the model:

```
    public function searchableAs()
    {
        return 'posts_index';
    }

    public function toSearchableArray()
    {
        $array = $this->toArray();

        // Customize array...

        return $array;
    }
```

The basic search:

```
$orders = App\Order::search('Star Trek')->get();
```

Please refer to the [Scout documentation](https://laravel.com/docs/master/scout#searching) for additional information. You can run more complex queries on index using callback, set the where clause, orderBy or paginate, for example:

```
$oorders = App\Order::search($keyword, function (SphinxQL $query) {
        return $query->groupBy('description');
    })
    ->where('status', 1)
    ->orderBy('date', 'DESC')
    ->paginate(20);
```

> Note: Changes on Sphinx indexes are only allowed for RT (Real Time) indexes. If you have ones and you need to update/delete records please define `public $isRT = true;` model's property.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~75 days

Total

2

Last Release

2050d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/534cdb651e8c806590fa945c6b5a18f361613848e890db1349f4a9fbcae1a650?d=identicon)[xutongle](/maintainers/xutongle)

---

Top Contributors

[![xutl](https://avatars.githubusercontent.com/u/20939388?v=4)](https://github.com/xutl "xutl (2 commits)")[![xutongle](https://avatars.githubusercontent.com/u/46956076?v=4)](https://github.com/xutongle "xutongle (1 commits)")

---

Tags

searchlaravelsphinxsearchscoutLarva

### Embed Badge

![Health badge](/badges/larva-laravel-scout-sphinxsearch/health.svg)

```
[![Health](https://phpackages.com/badges/larva-laravel-scout-sphinxsearch/health.svg)](https://phpackages.com/packages/larva-laravel-scout-sphinxsearch)
```

###  Alternatives

[algolia/scout-extended

Scout Extended extends Laravel Scout adding algolia-specific features

4186.3M6](/packages/algolia-scout-extended)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[teamtnt/laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch

1.1k2.5M28](/packages/teamtnt-laravel-scout-tntsearch-driver)[vanry/laravel-scout-tntsearch

包含中文分词的 Laravel Scout TNTSearch 驱动，支持 scws, phpanalysis 和 jieba 分词。

17811.8k1](/packages/vanry-laravel-scout-tntsearch)[zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

33340.2k](/packages/zing-laravel-scout-opensearch)[romanstruk/manticore-scout-engine

Laravel Manticore Scout Engine

4818.1k](/packages/romanstruk-manticore-scout-engine)

PHPackages © 2026

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