Download the PHP package divineomega/laravel-omega-search without Composer

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

Laravel Omega Search

Omega Search allows you to easily add an intelligent search engine to your Laravel powered website or web application. It can be configured to search any of your Eloquent models.

Under the hood, this uses the Omega Search package.

Installation

You can install this package with Composer.

Usage

To use Laravel Omega Search, first add the OmegaSearchTrait to the models you wish to search. You must then implement the following two abstract methods.

After this setup, a search can be performed by calling the static omegaSearch($searchText) method on the model. This method performs an intelligent fuzzy search, and returns a query builder filtered to the related records in descending order of relevance.

The related models can then be retrieved (->get()) or paginated (->paginate()) as required.

Joining Tables

If you want to search the content of related tables, you can use joins. Simply override the getOmegaSearchTablesToJoin on your model and return an array of OmegaSearchJoins.

Defining Joins

Join by related keys

There are two ways to define joins. The first way is to call the OmegaSearchJoin::joinTableByForeignKey method. You have to pass the local table name and joined table name to this method.

By default the key on the joined table will be the joined table name singularised with _id appended and the key on the local table will id. These can be set manually using the 3rd and 4th parameter for this method.

See below for an example:

or

You can chain joins as seen below:

Join Manually

If you want to join tables that are not just linked by related keys you can manually add conditions to a join. To do this create a new OmegaSearchJoin object and call the addCondition method to add your conditions. You must specify the local table name and the joined table name in the constructor. Optionally you can specify the join type, the default is JOIN

When adding a condition the parameter on the left will automatically have the local table name prepended and the joined table name will be prepended to the right condition.

See below for an example:


All versions of laravel-omega-search with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
divineomega/omega-search Version ^4.1.0
laravel/framework Version ^5.1||^6.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 divineomega/laravel-omega-search contains the following files

Loading the files please wait ....