Download the PHP package pion/laravel-lelastico without Composer

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

Lelastico - easier elastic search for Laravel

Total Downloads Latest Stable Version Latest Unstable Version License

Introduction

Focus of this library is to make it easier to manage elastic indices (wit mappings / settings), create reusable query building (manual or from request).

Requirements

Installation

1. Add custom repository to composer.json

2. Install via composer

3. Add the service provider (Laravel 5.4 and below - supports Auto discovery)

Dependencies

Usage

Set elastic hosts

For development, you can use default value in the config without password: localhost:9200

Use ELASTICSEARCH_HOSTS environment for setting elastic search hosts. Format.

Resolve elastic search client

Mapping types constants

Property mappings types using constants like:

Adding indices

  1. Create your indices by extending AbstractElasticIndex and implementing createIndexName for elastic index

    • Implement propertyMappings for custom mappings.

    • Implement settings for custom index settings
  2. Create or update lelastico.php config with indices classes.

  3. Update or create indices in elastic (stores settings / mapping) using php artisan elastic:indices

Sorting

By default we are sorting by _id after any HasSorting logic to ensure that pagination is correct.

You can turn this feature by using $builder->setSortById(false);

To enable sortable behavior add HasSorting trait to your instance of AbstractBuilder and implement method allowedSortFields.

With sorting enabled you can sort the results using sort request query parameter. This parameter accepts list of fields for sorting in format {field_name}:{sort_direction}.

Available directions for sorting are asc and desc and if not specified the default sort direction is set to asc.

Examples:

sort[]=goals

sort[]=goals:asc&sort[]=minutes:desc

Configuration

TODO

Changelog

Can be found in releases.

Contribution or extending

See CONTRIBUTING.md for how to contribute changes. All contributions are welcome.

Sponsors

This library was created and improved thanks to clients projects.

Copyright and License

laravel-elastico was written by Martin Kluska and is released under the MIT License.

Copyright (c) 2020 Martin Kluska


All versions of laravel-lelastico with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
illuminate/support Version >=5.5
illuminate/http Version >=5.5
illuminate/pagination Version >=5.5
illuminate/console Version >=5.5
illuminate/validation Version >=5.5
elasticsearch/elasticsearch Version ^7.17
erichard/elasticsearch-query-builder Version dev-collapse-and-improvments#9efe1b3a4491b8ca21b077d4d38ec8d53eeadd33
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 pion/laravel-lelastico contains the following files

Loading the files please wait ....