PHPackages                             open-southeners/laravel-scout-advanced-meilisearch - 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. open-southeners/laravel-scout-advanced-meilisearch

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

open-southeners/laravel-scout-advanced-meilisearch
==================================================

Advanced Meilisearch integration with Laravel Scout

5.1.0(1y ago)5254[2 PRs](https://github.com/open-southeners/laravel-scout-advanced-meilisearch/pulls)MITPHPPHP ^8.2CI passing

Since Sep 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/open-southeners/laravel-scout-advanced-meilisearch)[ Packagist](https://packagist.org/packages/open-southeners/laravel-scout-advanced-meilisearch)[ RSS](/packages/open-southeners-laravel-scout-advanced-meilisearch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (21)Used By (0)

Laravel Scout Advanced Meilisearch [![required php version](https://camo.githubusercontent.com/522f899decd3c8dd6ef5fb194cc199a5ea8ff40a71a94e5839ff51a593e89204/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f70656e2d736f757468656e6572732f6c61726176656c2d73636f75742d616476616365642d6d65696c69736561726368)](https://www.php.net/supported-versions.php) [![codecov](https://camo.githubusercontent.com/a84149f11ba7cec8b505980c37e49ebc6f17c21acb331f0b1d66556144a1123f/68747470733a2f2f636f6465636f762e696f2f67682f6f70656e2d736f757468656e6572732f6c61726176656c2d73636f75742d616476616e6365642d6d65696c697365617263682f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d5a454a3758444c564950)](https://codecov.io/gh/open-southeners/laravel-scout-advanced-meilisearch) [![Edit on VSCode online](https://camo.githubusercontent.com/1e825ede949540f53ec4dce8dc8ad93376081856a01b7e3ce2f24f41c9133405/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7673636f64652d656469742532306f6e6c696e652d626c75653f6c6f676f3d76697375616c73747564696f636f6465)](https://vscode.dev/github/open-southeners/laravel-scout-advaced-meilisearch)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-scout-advanced-meilisearch---)

Advanced Meilisearch integration with Laravel Scout.

Getting started
---------------

[](#getting-started)

Install the package using Composer:

```
composer require open-southeners/laravel-scout-advanced-meilisearch

```

### Filterable and sortable attributes

[](#filterable-and-sortable-attributes)

For sending filterable and sortable attributes to your Meilisearch server, configure your already searchable models like so:

```
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;

class Tag extends Model
{
    use Searchable;

    /**
     * Get the indexable data array for the model.
     *
     * @return array
     */
    public function toSearchableArray()
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'slug' => $this->slug,
        ];
    }

    /**
     * Get the search sortable attributes array for the model.
     *
     * @return array
     */
    public function searchableFilters(): array
    {
        return ['name'];
    }

    /**
     * Get the search sortable attributes array for the model.
     *
     * @return array
     */
    public function searchableSorts(): array
    {
        return ['slug'];
    }
}
```

#### Using PHP attributes

[](#using-php-attributes)

**In case your project is using PHP 8**, you can do this by attributes on the model class or the `toSearchableArray` method:

```
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Scout\Searchable;
use OpenSoutheners\LaravelScoutAdvancedMeilisearch\Attributes\ScoutSearchableAttributes;

#[ScoutSearchableAttributes(filterable: ['email'], sortable: ['name'])]
class User extends Authenticatable
{
    use Searchable;

    /**
     * Get the indexable data array for the model.
     *
     * @return array
     */
    public function toSearchableArray()
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'email' => $this->email,
        ];
    }
}
```

And finally run the following artisan command:

```
php artisan scout:update "App\Models\User"
```

You could also run this command with `--wait` option which tells the command to wait for the task to finish:

```
php artisan scout:update "App\Models\User" --wait
```

Remember to check [the official documentation about these filters and sorts](https://docs.meilisearch.com/learn/getting_started/filtering_and_sorting.html).

### Dumps

[](#dumps)

Create Meilisearch data dumps (data backups that will be saved on your Meilisearch server), with the following command:

```
php artisan scout:dump
```

As `scout:update` command, this also have a `--wait` option:

```
php artisan scout:dump --wait
```

[Read more about Meilisearch dumps here](https://docs.meilisearch.com/learn/advanced/dumps.html).

### Tasks

[](#tasks)

List all tasks via command line, just running the following:

```
php artisan scout:tasks
```

**They can be even filtered!** (see more options running it with `--help`)

```
php artisan scout:tasks --status=succeeded
```

#### Canceling enqueued tasks

[](#canceling-enqueued-tasks)

Also can cancel tasks with a very simple command, you can either cancel an specific task or multiple:

```
php artisan scout:tasks-cancel 1
```

The previous command will cancel task with UID = 1. If you wish to cancel multiple you could send them separated by comma or using options like:

```
php artisan scout:tasks-cancel --before-enqueued=1d
```

So this will cancel all tasks that were enqueued before 1 day (can also send 1m, 1y... **as in the background this is using `Carbon::now()->add()` &amp; `Carbon::now()->sub()` methods**)

#### Prune finished tasks

[](#prune-finished-tasks)

As canceling tasks won't make them disappear from the tasks history, you can just run the following:

```
php artisan scout:tasks-prune
```

Just for safety for debug purposes, **this command does not remove those tasks that failed**, if you wish to do so, run the command with `--include-failed` like so:

```
php artisan scout:tasks-prune --include-failed
```

**Don't worry, this will not remove tasks that were enqueued and not finished, as stated by Meilisearch official docs (see link just below).**

[Read more about Meilisearch tasks here](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html#task-workflow).

Partners
--------

[](#partners)

[![skore logo](https://github.com/open-southeners/partners/raw/main/logos/skore_logo.png)](https://getskore.com)

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance61

Regular maintenance activity

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~54 days

Recently: every ~167 days

Total

18

Last Release

428d ago

Major Versions

1.1.0 → 2.0.02022-09-26

2.x-dev → 3.0.02022-12-06

3.0.2 → 4.0.02023-05-12

3.x-dev → 4.1.02024-05-24

4.x-dev → 5.0.02025-03-11

PHP version history (5 changes)1.0.0PHP ^7.4|^8.0

3.0.0PHP ^8.0|^8.1

3.0.1PHP ^8.0|^8.1|^8.2

4.1.0PHP ^8.0

5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a77db503aca4f77ebd99d5083432b8d9eee1131c2a572bb890aabd6b993f9d1?d=identicon)[d8vjork](/maintainers/d8vjork)

---

Top Contributors

[![d8vjork](https://avatars.githubusercontent.com/u/2331052?v=4)](https://github.com/d8vjork "d8vjork (107 commits)")

---

Tags

extensionlaravellaravel-packagelaravel-scoutmeilisearchmeilisearch-phpphpphp-attributessearchmeilisearchlaravelfiltersopen-southenerslaravel scoutsorts

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/open-southeners-laravel-scout-advanced-meilisearch/health.svg)

```
[![Health](https://phpackages.com/badges/open-southeners-laravel-scout-advanced-meilisearch/health.svg)](https://phpackages.com/packages/open-southeners-laravel-scout-advanced-meilisearch)
```

###  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)[devnoiseconsulting/laravel-scout-postgres-tsvector

PostgreSQL Full Text Search Driver for Laravel Scout

58110.1k](/packages/devnoiseconsulting-laravel-scout-postgres-tsvector)[zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

33340.2k](/packages/zing-laravel-scout-opensearch)[vanry/laravel-scout-tntsearch

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

17811.8k1](/packages/vanry-laravel-scout-tntsearch)[omure/scout-advanced-meilisearch

Laravel Scout extension that allows to use meilisearch advanced features as well as has an extended collection driver for testing purposes.

123.9k](/packages/omure-scout-advanced-meilisearch)

PHPackages © 2026

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