PHPackages                             chapdel/laravel-meilitools - 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. chapdel/laravel-meilitools

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

chapdel/laravel-meilitools
==========================

Additional tools for Laravel Scout integration with MeiliSearch

1.2.0(3y ago)175MITPHPPHP ^7.4|^8.0|^8.1|^8.2

Since Feb 24Pushed 3y agoCompare

[ Source](https://github.com/chapdel/laravel-meilitools)[ Packagist](https://packagist.org/packages/chapdel/laravel-meilitools)[ RSS](/packages/chapdel-laravel-meilitools/feed)WikiDiscussions main Synced 1mo ago

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

Laravel MeiliTools
==================

[](#laravel-meilitools)

[![PHP](https://camo.githubusercontent.com/17b5eb33888d61aae1b0d686bab3f1fbeda41427e622d12e80c80b874dd082c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6477617266646b2f6c61726176656c2d6d65696c69746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dwarfdk/laravel-meilitools)[![Packagist](https://camo.githubusercontent.com/5ac4d6ac4980954eadb8ded1bfcafca99dd668660e83dfb8f2c576b969f947a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6477617266646b2f6c61726176656c2d6d65696c69746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dwarfdk/laravel-meilitools)[![Downloads](https://camo.githubusercontent.com/b0bdeba5d9754caa591080dc66a3c6f2e1a0023b2674ecf19584b2f7def429d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6477617266646b2f6c61726176656c2d6d65696c69746f6f6c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dwarfdk/laravel-meilitools)[![License](https://camo.githubusercontent.com/3e000b75b4e67ce7abde3fe4ed3e4fd2d0317b39c6d2673caf0e9693a76677ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f647761726668712f6c61726176656c2d6d65696c69746f6f6c732e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![GitHub Workflow Status](https://camo.githubusercontent.com/1a711e72e8a1a92230a820ba902987393a4ed1ccf14488822ed76d626a53c02d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f647761726668712f6c61726176656c2d6d65696c69746f6f6c732f74657374732e796d6c3f6272616e63683d6d61696e)](https://github.com/dwarfhq/laravel-meilitools/actions)

The purpose of this package is to ease the configuration of indexes for MeiliSearch, so it's possible to use advanced filtering and sorting through Laravel Scout, without having to meddle with their API manually.

Table of Contents
-----------------

[](#table-of-contents)

- [Compatibility](#compatibility)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
    - [Model Settings](#model-settings)
    - [Commands](#commands)
- [Examples](#examples)
- [Testing](#testing)
- [License](#license)

Compatibility
-------------

[](#compatibility)

Engine0.1.x0.2.x0.3.xv0.26.xXXv0.27.xXXv0.28.xXv0.29.xXv0.30.xXInstallation
------------

[](#installation)

Install this package via Composer:

```
$ composer require chapdel/laravel-meilitools
```

Configuration
-------------

[](#configuration)

Publish config using Artisan command:

```
$ php artisan vendor:publish --provider="Dwarf\MeiliTools\MeiliToolsServiceProvider"
```

Change configuration through `config/meilitools.php`.

Usage
-----

[](#usage)

This package provides commands and helpers to ease the use of configuring MeiliSearch indexes.

### Model Settings

[](#model-settings)

Setup index settings for a model by implementing the method provided by the contract.

```
use Dwarf\MeiliTools\Contracts\Indexes\MeiliSettings;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laravel\Scout\Searchable;

class Article extends Model implements MeiliSettings
{
    use Searchable;
    use SoftDeletes;

    /**
     * {@inheritdoc}
     */
    public function meiliSettings(): array
    {
        // When using soft deletes '__soft_deleted' will automatically be added to filterable attributes.
        return ['filterableAttributes' => ['status']];
    }
}
```

A full list of available index settings can be found [here](https://docs.meilisearch.com/learn/configuration/settings.html).

### Commands

[](#commands)

The following commands are available:

#### `meili:index:create` - Create a new MeiliSearch index

[](#meiliindexcreate---create-a-new-meilisearch-index)

**Arguments:**

- `index` : Index name

**Options:**

- `--force` : Force the operation to run

#### `meili:index:delete` - Delete a MeiliSearch index

[](#meiliindexdelete---delete-a-meilisearch-index)

**Arguments:**

- `index` : Index name

#### `meili:index:details` - Get details for a MeiliSearch index

[](#meiliindexdetails---get-details-for-a-meilisearch-index)

**Arguments:**

- `index` : Index name

#### `meili:index:reset` - Reset settings for a MeiliSearch index

[](#meiliindexreset---reset-settings-for-a-meilisearch-index)

**Arguments:**

- `index` : Index name

**Options:**

- `--pretend` : Only shows what changes would have been done to the index

#### `meili:index:view` - Get base information about a MeiliSearch index

[](#meiliindexview---get-base-information-about-a-meilisearch-index)

**Arguments:**

- `index` : Index name

**Options:**

- `--stats` : Whether to include index stats

#### `meili:indexes:list` - List all MeiliSearch indexes

[](#meiliindexeslist---list-all-meilisearch-indexes)

**Options:**

- `--stats` : Whether to include index stats

#### `meili:model:details` - Get details for a MeiliSearch model index

[](#meilimodeldetails---get-details-for-a-meilisearch-model-index)

**Arguments:**

- `model` : Model class

#### `meili:model:reset` - Reset settings for a MeiliSearch model index

[](#meilimodelreset---reset-settings-for-a-meilisearch-model-index)

**Arguments:**

- `model` : Model class

**Options:**

- `--pretend` : Only shows what changes would have been done to the index

#### `meili:model:synchronize` - Synchronize settings for a MeiliSearch model index

[](#meilimodelsynchronize---synchronize-settings-for-a-meilisearch-model-index)

**Arguments:**

- `model` : Model class

#### `meili:model:view` - Get base information about a MeiliSearch model index

[](#meilimodelview---get-base-information-about-a-meilisearch-model-index)

**Arguments:**

- `model` : Model class

**Options:**

- `--stats` : Whether to include index stats

**Options:**

- `--pretend` : Only shows what changes would have been done to the index

#### `meili:models:synchronize` - Synchronize all models implementing MeiliSearch index settings

[](#meilimodelssynchronize---synchronize-all-models-implementing-meilisearch-index-settings)

**Options:**

- `--pretend` : Only shows what changes would have been done to the indexes
- `--force` : Force the operation to run when in production

Examples
--------

[](#examples)

Model commands can take both full class name and base name, with the latter being completed using the configured paths.

```
$ php artisan meili:model:details App\\Models\\Article
$ php artisan meili:model:details Article

$ php artisan meili:model:reset App\\Models\\Article
$ php artisan meili:model:reset Article

$ php artisan meili:model:synchronize App\\Models\\Article
$ php artisan meili:model:synchronize Article

$ php artisan meili:model:view App\\Models\\Article
$ php artisan meili:model:view Article

```

Testing
-------

[](#testing)

Running tests can be done either through composer, or directly calling the PHPUnit binary.

```
$ composer test
```

To run tests with code coverage, please make sure that `phpdbg` exists and is executable.

```
$ composer test:coverage
$ open tests/_reports/index.html
```

Career
------

[](#career)

Dwarf A/S is a digital agency based in Copenhagen (Denmark) and established January 1st 2000.

We're always looking for new talent, so have a look at our [website](https://dwarf.dk/career/php-developer) for job openings.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 85.4% 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 ~14 days

Total

3

Last Release

1146d ago

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

1.1.0PHP ^7.4|^8.0|^8.1

1.2.0PHP ^7.4|^8.0|^8.1|^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20987014?v=4)[Chapdel KAMGA](/maintainers/chapdel)[@chapdel](https://github.com/chapdel)

---

Top Contributors

[![FrittenKeeZ](https://avatars.githubusercontent.com/u/1186125?v=4)](https://github.com/FrittenKeeZ "FrittenKeeZ (70 commits)")[![macbookandrew](https://avatars.githubusercontent.com/u/784333?v=4)](https://github.com/macbookandrew "macbookandrew (8 commits)")[![chapdel](https://avatars.githubusercontent.com/u/20987014?v=4)](https://github.com/chapdel "chapdel (4 commits)")

---

Tags

meilisearchlaravelscoutmeilimeilitools

### Embed Badge

![Health badge](/badges/chapdel-laravel-meilitools/health.svg)

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

###  Alternatives

[dwarfdk/laravel-meilitools

Additional tools for Laravel Scout integration with MeiliSearch

10022.4k](/packages/dwarfdk-laravel-meilitools)[baijunyao/laravel-scout-elasticsearch

Elasticsearch Driver for Laravel Scout

8023.7k1](/packages/baijunyao-laravel-scout-elasticsearch)[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)
