Download the PHP package michelmelo/laravel-search without Composer

On this page you can find all versions of the php package michelmelo/laravel-search. 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-search

Search Package for Laravel 5|6|7|8

This package provides a unified API across a variety of different full text search services. It currently supports drivers for Elasticsearch, Algolia, and ZendSearch (good for local use).

Installation Via Composer

Add this to you composer.json file, in the require object:

After that, run composer install to install the package.

Add the service provider to app/config/app.php, within the providers array.

OR

Add a class alias to app/config/app.php, within the aliases array.

Configuration

Publish the default config file to your application so you can make modifications.

OR

Dependencies

The following dependencies are needed for the listed search drivers:

Default Index

This package provides a convenient syntax for working with a "default" index. Edit the default_index field in the config file to change this value. If you need to work with more than one index, see Working With Multiple Indicies below.

Indexing Operations

Indexing is very easy with this package. Simply provide a unique identifier for the document and an associative array of fields to index.

The index will be created automatically if it does not exist the first time you access it.

Index A Document

Add a document to the "default" index with an id of "1".

Note: id may be a string or an integer. This id is used to delete records and is also returned in search results.

Store Extra Parameters With A Document

You may store extra parameters with a document so they can be retrieved at a later point from search results. This can be useful for referencing timestamps or other record identifiers.

Note: Extra parameters are not indexed but are stored in the index for future retrieval.

Delete A Document

Delete a document from the "default" index with an id of "1":

Delete An Index

Search Operations

Search For A Document

Search the "default" index for documents who's content field contains the word "fox":

Search More Than One Field

Search All Fields

Perform A Fuzzy Search

Perform a fuzzy search to find results with similar, but not exact, spelling. For example, you want to return documents containing the word "updates" by searching for the word "update":

Note: You may also pass a numeric value between 0 and 1 for the fuzzy parameter, where a value closer to 1 requires a higher similarity. Defaults to 0.5.

Apply A Filter To Your Query

You can apply filters to your search queries as well. Filters attempt to match the value you specify as an entire "phrase".

Note: Filters do not guarantee an exact match of the entire field value if the value contains multiple words.

Geo-Search

Some drivers support location-aware searching:

Where the parameters are latitude, longitude, and distance (in meters).

Note: Currently, only the algolia driver supports geo-searching. Ensure each indexed record contains the location information: _geoloc => ['lat' => 1.23, 'lng' => 1.23].

Limit Your Result Set

Paginate Your Result Set

You can also paginate your result set using a Laravel paginator instance.

Limit The Fields You Want Back From The Response

Chain Multiple Searches And Filters

Note: Chained filters/searches are constructed as boolean queries where each must provide a match.

Delete All Documents That Match A Query

Working With Multiple Indicies

If you need to work with more than one index, you may access all of the same methods mentioned above after you specify the index name.

Add a document to an index called "posts":

Search the "posts" index for documents who's content field contains the word "fox" and who's status is "published":

Delete a document from the "posts" index with an id of "1":

Delete the entire "posts" index:

Advanced Query Callbacks

If you need more control over a search query you may add a callback function which will be called after all conditions have been added to the query but before the query has been executed. You can then make changes to the native query instance and return it to be executed.

Since each driver has it's own native $query object/array, you may only want to execute your callback for one of the drivers:

Note: You may also pass an array of drivers as the second parameter.


All versions of laravel-search with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/support Version 5.5.* || 5.6.* || 5.7.* || 5.8.* || 6.*.* || 7.*.* || 8.*.*
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 michelmelo/laravel-search contains the following files

Loading the files please wait ....