Meilitools offers advanced Meilisearch index features in Laravel Scout

Packages

September 22nd, 2022

Meilitools offers advanced Meilisearch index features in Laravel Scout

Laravel Meilitools provides additional tools for Laravel Scout 9+ integration with MeiliSearch. This package aims to open the possibility of using advanced filtering easily and sorting through Laravel Scout without manually diving into the internals of the Meilisearch API.

Here's an example from the package's readme of setting up indexes for a model by implementing the MeiliSettings interface:

use Dwarf\MeiliTools\Contracts\Indexes\MeiliSettings;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
 
class Article extends Model implements MeiliSettings
{
use Searchable;
 
/**
* {@inheritdoc}
*/
public function meiliSettings(): array
{
return ['filterableAttributes' => ['status']];
}
}

This package also includes useful Artisan commands for things like getting the details of an index, resetting the settings of an index, and more.

If you are experimenting with Meilisearch and Scout, check out our Getting started with Laravel Scout and Meilisearch tutorial.

You can get started with this package on GitHub at dwarfhq/laravel-meilitools.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.