Sunday, May 5, 2024
HomePHPMeilitools gives superior Meilisearch index options in Laravel Scout

Meilitools gives superior Meilisearch index options in Laravel Scout


Laravel Meilitools offers further instruments for Laravel Scout 9+ integration with MeiliSearch. This bundle goals to open the potential of utilizing superior filtering simply and sorting by means of Laravel Scout with out manually diving into the internals of the Meilisearch API.

Here is an instance from the bundle’s readme of establishing indexes for a mannequin by implementing the MeiliSettings interface:

1use DwarfMeiliToolsContractsIndexesMeiliSettings;

2use IlluminateDatabaseEloquentModel;

3use LaravelScoutSearchable;

4 

5class Article extends Mannequin implements MeiliSettings

6{

7 use Searchable;

8 

9 /**

10 * {@inheritdoc}

11 */

12 public operate meiliSettings(): array

13 {

14 return ['filterableAttributes' => ['status']];

15 }

16}

This bundle additionally contains helpful Artisan instructions for issues like getting the small print of an index, resetting the settings of an index, and extra.

If you’re experimenting with Meilisearch and Scout, try our Getting began with Laravel Scout and Meilisearch tutorial.

You may get began with this bundle on GitHub at dwarfhq/laravel-meilitools.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments