Download the PHP package jdkweb/search without Composer

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

laravel Search

Packagist Version Static Badge Static Badge

Laravel-Search is a search-engine using the models. Search easily, flexible add intelligent on your Laravel website or application.

Static Badge Static Badge

laravel search

Table of contents

Installation

Requires PHP 8.1 and Laravel 10 or higher

Install the package via composer:

Config

For configuration settings you need to publish the config

In the config is needed for:

Usage

Configuration with config file

Publish the config first.

Search engine configuration

Base configuration for the search engine in the config-file

Searchable model configuration
Example

The example below shows the configuration of a search engine named 'global'.

In short, one can defining multiple search engines. This makes it possible to create multiple specific search sets that behave different. You can create a global search engine or one for a specific page/model.

See example of large configuration file with methods an closures

Rename query strings parameters

Renaming the GET variables that appear in the URL

Preset search words

It is possible to fire a searchQuery by default.

In config file

Search Result items per page

Change search result items per page

Example config

A setup for three different search engine configurations, each in a other situation with more specific search results

Configuration directly embed settings in script

Without using a config file

Using the search engine

Laravel-search is working with GET variables (query strings parameters can be renamed)

By default, if defined, the search engine configuration called 'default' is used.

You can use a custom configuration by calling the settings() methode

Result:

ordered by relevance

Filters (search groups)

use result filters

The searchable models we defined earlier can be used to create filters (or search groups). As shown in the example above.

Use specific model or group of models for searching

Operators for conditions

In the search conditions is it possible to use operators

Operator Type Example Query Builder
=, eq Equal 'id' => 10 (default) ->where('id',10)
'id:=' => 10
!=, !eq, neq Unequal 'id:!=' => 10 ->where('id','!=', 10)
'id:neq' => 10
>, gt Greater than 'age:>' => 35
>=, gte Greater than or equal 'age:gte' => 35 ->where('age', '>=', 35)
\<, lt Less than 'age:<' => 12 ->where('age', '<', 12)
\<=, lte Less than or equal 'age:lte' => 12 ->where('age', '<=', 12)
in In 'id:in' => [10,11,12] ->whereIn('id',[10,11,12])
!in, notin Not in 'id:!in' => [2,4] ->whereNotIn('id',[2,4])
like Like 'title:like' => '%Linux%' ->where('title', 'LIKE', '%linux%')
!like, notlike Not like 'title:notlike' => '%linux%' ->where('title', 'NOT LIKE', '%linux%')
or Or 'or:published' => 1 ->orWhere('published', 1)
Or 'or:id:in' => [10,11] ->orWhereIn('id', [10,11]])

Filter specific words from the search

Language related list of words that are filtered from the search

Removing Linking words (the, and, ...) makes it possible to keep the search results cleaner.

Methods and Closures

The configurations above provide several examples of using methods and Closures.

This makes it possible to relate the models to Closure functions, and methods form (other) models or controllers.

Methods

In config file

Directly into the script

Method in model (\App\Models\Articles)

Closures

Compare configuration settings

Config-file

Directly embed settings into the script


All versions of search with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 jdkweb/search contains the following files

Loading the files please wait ....