PHPackages                             wlademon/laravel-scout-sphinx - 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. wlademon/laravel-scout-sphinx

ActiveLibrary

wlademon/laravel-scout-sphinx
=============================

Laravel Scout Sphinx Driver

2.7(4y ago)03MITPHPPHP &gt;=7.0

Since Jun 20Pushed 3y agoCompare

[ Source](https://github.com/Wlademon/laravel-scout-sphinx)[ Packagist](https://packagist.org/packages/wlademon/laravel-scout-sphinx)[ RSS](/packages/wlademon-laravel-scout-sphinx/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (15)Used By (0)

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

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

[![Build Status](https://camo.githubusercontent.com/fb92c01ddc37ffa0fc2710ac2464dc391768093b46b41262693a01fe4d39e576/68747470733a2f2f6170702e7472617669732d63692e636f6d2f636f6e7374616e7461626c652f6c61726176656c2d73636f75742d737068696e782e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/constantable/laravel-scout-sphinx)[![Latest Version on Packagist](https://camo.githubusercontent.com/e621c7c47fe48dde6ca8b11be9f276ce1ab5ae338c44030c5dea01d5228fcdc7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e7374616e7461626c652f6c61726176656c2d73636f75742d737068696e782e7376673f7374796c653d666c6174)](https://packagist.org/packages/constantable/laravel-scout-sphinx)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)

Introduction
------------

[](#introduction)

This package offers advanced functionality for searching and filtering data using the [Sphinx full text search server](http://sphinxsearch.com/) for [Laravel Scout](https://laravel.com/docs/master/scout).

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

[](#installation)

### Composer

[](#composer)

Use the following command to install this package via Composer.

```
composer require wlademon/laravel-scout-sphinx
```

### 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, which you can than edit and set `sphinxsearch` as the Scout driver.

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

To configure the connection to Sphinx server add the following (i.e. default) 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 required.

Usage
-----

[](#usage)

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

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

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

        // Customize array...

        return $array;
    }
```

A 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 the index by using a callback, setting the `where` clause, `orderBy`, or `paginate` threshold. For example:

```
$orders = 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 these and need to update/delete records please define `public $isRT = true;` in the model's property.

Credits
-------

[](#credits)

- [Hyn](https://github.com/hyn)

License
-------

[](#license)

Licensed under the MIT license

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 58.8% 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 ~68 days

Recently: every ~154 days

Total

13

Last Release

1703d ago

Major Versions

1.x-dev → 2.02019-09-10

PHP version history (2 changes)1.0PHP &gt;=5.6.4

1.x-devPHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/34088316f8a7dfa3c89f052631344cbb65c945a1d7919ac9d8bf53de244921f0?d=identicon)[Wlademon](/maintainers/Wlademon)

---

Top Contributors

[![constantable](https://avatars.githubusercontent.com/u/11844178?v=4)](https://github.com/constantable "constantable (20 commits)")[![Wlademon](https://avatars.githubusercontent.com/u/13198393?v=4)](https://github.com/Wlademon "Wlademon (4 commits)")[![Jon78](https://avatars.githubusercontent.com/u/51792370?v=4)](https://github.com/Jon78 "Jon78 (4 commits)")[![MaxKorlaar](https://avatars.githubusercontent.com/u/8917249?v=4)](https://github.com/MaxKorlaar "MaxKorlaar (2 commits)")[![ben221199](https://avatars.githubusercontent.com/u/12856904?v=4)](https://github.com/ben221199 "ben221199 (2 commits)")[![raphaelstolt](https://avatars.githubusercontent.com/u/48225?v=4)](https://github.com/raphaelstolt "raphaelstolt (1 commits)")[![notcgi](https://avatars.githubusercontent.com/u/56194947?v=4)](https://github.com/notcgi "notcgi (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wlademon-laravel-scout-sphinx/health.svg)

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

###  Alternatives

[orchid/platform

Platform for back-office applications, admin panel or CMS your Laravel app.

4.8k2.5M59](/packages/orchid-platform)[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)[algolia/scout-extended

Scout Extended extends Laravel Scout adding algolia-specific features

4186.3M6](/packages/algolia-scout-extended)[matchish/laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout

7431.6M2](/packages/matchish-laravel-scout-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[sti3bas/laravel-scout-array-driver

Array driver for Laravel Scout

971.5M3](/packages/sti3bas-laravel-scout-array-driver)

PHPackages © 2026

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