Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Meili Bundle

Meili Bundle Laravel Package

survos/meili-bundle

Symfony bundle that integrates Meilisearch into your application, simplifying index configuration, indexing Doctrine entities, and running fast full-text and faceted searches through autowired services and sensible defaults.

View on GitHub
Deep Wiki
Context7

Utilities for managing a meilisearch indexes

Frequently asked questions about Meili Bundle
How do I install survos/meili-bundle in a Symfony application?
Install it with Composer using composer require survos/meili-bundle. In a Symfony Flex application the bundle is registered automatically; otherwise enable it in config/bundles.php. You also need a running Meilisearch instance plus a small amount of bundle configuration for the host and API key.
Can I use survos/meili-bundle with Laravel?
No. survos/meili-bundle is built for Symfony and relies on Symfony's dependency injection container and bundle configuration, so it will not work as a Laravel package. In Laravel the usual path is Laravel Scout with the official Meilisearch driver. You can still use Meilisearch as your search engine there, just not through this bundle.
How do I configure the Meilisearch host and API key for the bundle?
Configuration lives in a Symfony config file such as config/packages/meili.yaml, where you point the bundle at your Meilisearch URL and API key and declare the indexes you want. The bundle turns those settings into client services you can autowire into your own code. Keep the key in environment variables instead of committing it. Check the bundle README for the exact configuration keys for your installed version.
How does the bundle index Doctrine entities into Meilisearch?
The bundle includes Doctrine integration so you can map entities to Meilisearch indexes and populate those indexes from your database. Indexing is normally triggered through the bundle's console commands, which read your Doctrine entities and push documents to Meilisearch. You declare which fields are searchable and filterable in the index settings. This keeps index configuration in Symfony config rather than in ad hoc scripts.
What console commands does survos/meili-bundle provide?
The bundle ships console commands for creating indexes, populating them from Doctrine, and general index maintenance. Run bin/console list and filter by the bundle's namespace to see the exact command names in your version. They are intended to be run from your shell, a deploy script, or a scheduler after content changes.
How do I set searchable and filterable attributes for an index?
Index settings such as searchable attributes, filterable attributes, and sortable attributes are declared in the bundle configuration. The bundle applies those settings to the matching Meilisearch index so ranking and faceting behave consistently. Re-apply settings after changing them, since Meilisearch stores settings per index. Attribute names must match the fields you actually push as documents.
How do I run a search query from a controller or service?
Because the Meilisearch client and index services are registered in the Symfony container, you can autowire them into a controller, repository, or any other service. From there you call Meilisearch's search API through the injected client, passing your query, filters, and pagination options. Results come back as Meilisearch response objects or arrays that you can map into your own DTOs before rendering.
How do I test an app that uses this bundle without a running Meilisearch server?
For unit tests, mock or stub the Meilisearch client service so tests do not depend on a live server. For integration tests, run a disposable Meilisearch instance, for example in Docker, and point the test environment configuration at it. Use environment-specific index names so test runs never overwrite production data.
Is survos/meili-bundle safe to use in production?
It is a thin integration layer over the official Meilisearch PHP client, so production suitability mostly depends on how you operate Meilisearch itself. Use a search-only API key in the browser and keep the admin key server-side, run indexing through console commands or background jobs, and reindex after settings or schema changes. Plan for zero-downtime reindexing, for example by building a new index and swapping the alias.
How does it compare to Laravel Scout or the official Meilisearch PHP SDK, and is it maintained?
Alternatives include the official Meilisearch PHP SDK, which is framework-agnostic but more manual, Laravel Scout if you are on Laravel, and Elasticsearch or OpenSearch bundles for more complex search requirements. This bundle's value is the Symfony DI wiring plus Doctrine indexing shortcuts, so weigh whether that saves enough compared with the plain SDK. Check the GitHub repository for recent commits, tagged releases, and supported Symfony versions before adopting it.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect