Download the PHP package dzava/global-search without Composer

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

GlobalSearch

Installation

You can install the package via composer:

Optionally publish the config:

Usage

Add the searchableFields method to searchable models.

Perform a search

To limit the number of results per model use the limit($limit) method. Given a limit of 0 all matching results are returned.

If no matching records are found for a model then the group is omitted from the results. To include empty groups use the withEmpty() method.

You can override the default group key when registering the models

If you don't want to group the results use the withoutGroups() method.

Formatting the results

Results are formatted using the toArray method of the model. You can use a different method by changing the toArray option in the config file. If the method is missing from the model then it will fallback to toArray.

You can disable formatting entirely with the withoutFormatting() method, in which case the model is returned.

Customizing the query

You can customize the search query by implementing the searchQuery method in your models. The method will receive two parameters, the query Builder instance and the search term, and it should return the query to be executed.

When a model uses the Laravel\Scout\Searchable trait scout will be used automatically.

Authorization

The package will use Laravel's authorization policies, when available. If a policy is found, then the policy's authorization method is checked. You can change the authorization method used by setting the policy-method config option.

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of global-search with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
illuminate/support Version ~5.5.0|~5.6.0|~5.7.0|~5.8.0
illuminate/database Version ~5.5.0|~5.6.0|~5.7.0|~5.8.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 dzava/global-search contains the following files

Loading the files please wait ....