Download the PHP package chr15k/laravel-meilisearch-advanced-query without Composer

On this page you can find all versions of the php package chr15k/laravel-meilisearch-advanced-query. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-meilisearch-advanced-query

Laravel Meilisearch Advanced Query

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

This library provides an intuitive query builder that makes generating more complex Meilisearch queries (compound, nested, meilisearch specific operators, ranking etc.) easier, replacing the need to construct your own raw Meilisearch queries when working with Scout's advanced filter option. Check out the Usage section below :)

[!NOTE] This package assumes you have installed and setup the following:

  1. Laravel Scout
  2. Meilisearch driver

Install

Usage

For context, go here to see how custom search engine queries are typically used with Laravel Scout.

[!NOTE] The following example effectively replaces the standard User::search($term, $callback) method and will return a Scout Builder instance after calling search() as expected:

Builder Methods

where(column, operator(optional), value(optional), boolean(optional))

orWhere(column, operator(optional), value(optional))

whereIn(column, value(optional))

orWhereIn(column, value(optional))

whereNotIn(column, value(optional))

orWhereNotIn(column, value(optional))

whereNot(column, value(optional))

orWhereNot(column, value(optional))

whereIsEmpty(column)

orWhereIsEmpty(column)

whereTo(column, from, to)

orWhereTo(column, from, to)

 whereRaw(rawQuery)

 orWhereRaw(rawQuery)

whereExists(column)

orWhereExists(column)

whereIsNull(column)

orWhereIsNull(column)


Nested / grouped queries

Sorting

In addition to the above methods, you can also call sort on the builder instance as follows:

Single column sort:

Multiple column sort:

For more information on sorting see this link

Supported search engine operators

Docs: Meilisearch operators

Alternatively to the methods above, any of these operators can be called on where() or orWhere() methods, example:

Calling without operator will default to equals (same behaviour as Eloquent):

Debugging / helpers

To get the raw query string from the builder, call compile() instead of search()

To inspect the current builder instance properties:

Or use the dump helper:

Tests


All versions of laravel-meilisearch-advanced-query with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
http-interop/http-factory-guzzle Version ^1.2
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
laravel/scout Version ^8.0|^9.0|^10.0
meilisearch/meilisearch-php Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chr15k/laravel-meilisearch-advanced-query contains the following files

Loading the files please wait ....