Download the PHP package akkurateio/laravel-search without Composer

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

Laravel Search

This package provides a search engine for Akkurate Laravel Boilerplate.

By default, the search is performed on specific fields of the Eloquent model via the Spatie laravel-searchable package.

If this is insufficient for the needs of the project, this package allows to set up an indexing in Elasticsearch.

Installation

Publish the configuration file:

Publish views:

Publish the partial of the View component for Elasticsearch:

Publish entry views for the results page:

Eloquent

Configuration

In the laravel-search configuration file, declare the models to search and the fields to search on:

Elastic

Configuration

By default, the Elastic version is not active. In the app.js:

then

In the .env:

Add an observer in the config file

Create the observer

By default, the model is supposed to be in App\Models.

It is possible to change the path by providing a --namespace option. For example, if the model Example is in Package\Models:

Fill in the url schema to reach the resource (to generate the link that will appear when the resource goes up in the search results).

For example:

Add the declaration in the config file

index: should the model be indexed or not.

where: in the search:sync command, if you don't want to send all the results to the Elastic database, it is possible to fill in a where clause, for example['status' => 'active'].

route: the resource access schema, to generate the url when using the CLI.

key: the field defined to access the resource. By default 'id' if absent, but can be set to 'uuid' or 'slug', etc. as needed.

name: the model field used to fill the name field in Elastic.

suggest: on FALSE the entry goes directly up in the results; on TRUE the entry does not go up in the results but is used to bring up related results.

env: the environment in which the results are to be reported.

link: the view to which the links for this model will point ('edit' or 'show').

Entities

A function in the model allows to define and update the entities (relations to be indexed) for a given model.

Example: define an ACCOUNT entity on each USER. On the model App\Models\User :

CLI

Check the connection with akk4search

Display the list of observed models

Synchronize data with the ElasticSearch database

Test a keyword search

Generate a new observer

Delete data in the Elastic database

Removes all elastic data of the observed models (set to TRUE in the .env) + their SQL searchables

Removes all the elastic data related to the account (relative to the key filled in the .env) + their SQL searchables.

Removes all elastic data related to the doctype(s). Searchables must be deleted manually.

Removes all elastic data from the observed models and performs a synchronization.


All versions of laravel-search with dependencies

PHP Build Version
Package Version
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 akkurateio/laravel-search contains the following files

Loading the files please wait ....