Meili Search
Description
Meili Search adds the Enso integration layer for Meilisearch-backed search.
The package persists the runtime enablement flag, exposes the settings form used from the backoffice, and ships artisan commands for creating, importing, flushing, and deleting model indexes through Laravel Scout and the Meilisearch PHP client.
It is designed for Enso models that already implement Scout searchability and need application-controlled index lifecycle operations plus a backoffice toggle.
Installation
Install the package:
composer require laravel-enso/meili-search
Run the package migrations:
php artisan migrate
Make sure the host application already has Laravel Scout configured with the meilisearch driver.
Features
- Persists a single settings record used to enable or disable the Meilisearch integration.
- Registers the settings routes and form under
Integrations -> Meili Search -> Settings. - Provides commands for
index,import,flush, anddeleteflows. - Wraps the Meilisearch PHP client in a dedicated service for index lifecycle operations.
- Keeps the integration opt-in even when Scout is configured globally.
Usage
Enable the integration from the Meili Search settings screen or by updating the meilisearch_settings record.
The package expects searchable models to define a standard Scout configuration, including searchableAs() when custom index names are required.
Examples:
php artisan enso:meilisearch:index "App\\Models\\Product"
php artisan enso:meilisearch:import "App\\Models\\Product" --chunk=500
php artisan enso:meilisearch:flush "App\\Models\\Product"
php artisan enso:meilisearch:delete "App\\Models\\Product"
API
HTTP routes
GET api/integrations/meilisearch/settingsPATCH api/integrations/meilisearch/settings/{settings}
Route names:
integrations.meilisearch.settings.indexintegrations.meilisearch.settings.update
Artisan commands
enso:meilisearch:index {model}enso:meilisearch:delete {model}enso:meilisearch:flush {model}enso:meilisearch:import {model} {--chunk=}
Service
LaravelEnso\\MeiliSearch\\Services\\MeiliSearch
Behavior:
- creates indexes using the model
searchableAs()name - imports searchable records through Scout
- flushes Scout indexes
- deletes indexes directly from Meilisearch
Depends On
Required Enso packages:
Required external packages:
Companion frontend package:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!