Download the PHP package pascalvgemert/laravel-cloud-search without Composer

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

laravel-cloud-search

An Eloquent way to use CloudSearch within Laravel

Requires PHP 7.1, Laravel 5.5 or higher and the Laravel AWS package!

Installation

You can install the package via composer:

To install the AWS package follow the steps in the README.md on: AWS Service Provider for Laravel 5 & 6

Usage

Instead of using Models, you create Documents. They almost work the same as a Model Class.

Example:

Now you can use this Document to query it like you would query an Eloquent model.

Example:

Extra CloudSearch Methods

Method Example
phrase Product::query()->phrase('Nemo')->get(); (see section: Searching below for more details)
whereLiteral Product::query()->whereLiteral('type', 'game')->get();

Debugging

To debug your build query, you can use the getQuery() method just like Eloquent.

Another great feature is that you can hook into the cloudsearch.query event. The event contains the time it took to execute the query at CloudSearch, which arguments where used and the trace from the place the query got executed. For example you can hook the CloudSearch queries into the Laravel-Debugbar

In Laravel you can listen to the Event as follows:

Searching

To fuzzy search you can use the phrase(string $searchPhrase, int|float $fuzziness = null, bool $lookForAnyWord = false) method.

The $fuzziness is a decimal percentage 0 to 1 where the default is 0.25. The $lookForAnyWord is a boolean to search for all or any words, default is all words.

Facets

A much used functionality of CloudSearch is the use of Facets / Buckets. This can easily be taking in account while making your query:

Statistics (stats)

The same goes for Statistics or stats as they're called in AWS CloudSearch:


All versions of laravel-cloud-search with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
illuminate/contracts Version ^5.5|^6|^7|^8
illuminate/support Version ^5.5|^6|^7|^8
aws/aws-sdk-php Version ^3.0
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 pascalvgemert/laravel-cloud-search contains the following files

Loading the files please wait ....