mri/scout-plus

This package adds enhanced functionalities to the Laravel Scout package.

v1.0.0 2023-11-25 06:07 UTC

This package is auto-updated.

Last update: 2024-05-25 07:29:38 UTC


README

Introduction

Scout Plus is a laravel package based on Laravel Scout package.

Laravel Scout currently provides limited supports to the popular search engines: Algolia & Meilisearch.

The objective of this package is to extend the capabilities of Laravel Scout, enabling it to support all operations provided by the supported search engines.

Currenly Scout Plus provides extend support for Meilisearch only.

Installing

This package requires Laravel 9.0 or later running on PHP 8.0 or higher.

This package can be installed using composer:

composer require rrakibul/scout-plus

Documentation

Documentation for Scout can be found on the Laravel website.

Usage

Please follow the Scout documentation for development instructions.

Additional usages are given below that will support this package as well.

Document::search($q)->whereBetween('updated_at_timestamp', [$from, $to])

Now where clause will accept three parameters: [field], [operator], [value].

Supported operators: = , !=, >, <, >=, <=

Order::search($q)->where('amount', '>' 100)
// In case you ommit the operator parameter, this package will assume the operator is `=`.   

Order::search($q)->where('amount', 100)

Note: Currently, the above operations will work only for meilisearch driver.

License

Scout Plus is open-sourced software licensed under the MIT license.