PHPackages                             adair-creative/searching - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. adair-creative/searching

ActiveLibrary[Search &amp; Filtering](/categories/search)

adair-creative/searching
========================

A tool for easy and advanced search and analytical functionality

030PHP

Since Aug 12Pushed 6y ago2 watchersCompare

[ Source](https://github.com/adair-creative/searching)[ Packagist](https://packagist.org/packages/adair-creative/searching)[ RSS](/packages/adair-creative-searching/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Searching
=========

[](#searching)

About
-----

[](#about)

A tool for flexible and advanced search functionality including:

- CMS Analytics
- Search term routing
- Non-intrusive implementation

Installation
------------

[](#installation)

```
composer require adair-creative/searching
```

Guide
-----

[](#guide)

### Basic Usage

[](#basic-usage)

```
use AdairCreative\Searching;

class YourPage_Controller extends PageController {
	 public function index(HTTPRequest $request) {
		if ($query = $request->getVar('q')) {
			return $this->customise([
				"Results" => Searching::search(Product::class, "Title", $search);
			]);
		}
	}
}
```

### Term Linking

[](#term-linking)

```
// ...

$link = null;
$resources = Searching::search(Product::class, "Title", $query, $link, true);

if ($link != null) {
	if ($link->Type == 1) return $this->redirect($link->Redirect()->Link());
	else $query = $link->Substitute;
}

// ...
```

Reference
---------

[](#reference)

### AdairCreative\\Searching

[](#adaircreativesearching)

> *function* `search()` : *ArrayList*
>
> > *string*|*string\[\]* `$from` - The model(s) to search from
>
> > *string*|*string\[\]* `$fieldName` - The field(s) to search from, if array items will map to corresponding model
>
> > *string* `$query` - Value to seach with; trimmed and no-case
>
> > **Default *null*** *TermLink* `&$term` - A pointer to the first found term (null if none)
>
> > **Default *false*** *bool* `$useSubstitute` - When *true*, If `$term` is of type substitute then update `$search` to the substitute value

### AdairCreaitve\\Searching\\TermLink

[](#adaircreaitvesearchingtermlink)

> *string* `$Term` - the search term to override

> *int* `$Type` - The action to perform on override
>
> > 0 - Use substitute
>
> > 1 - Use redirect

> *string* `$Substitute` - The search value substitute

> *function* `Redirect()` : *SiteTree*

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43144345?v=4)[Jesse Solomon](/maintainers/jessedsolomon)[@jessedsolomon](https://github.com/jessedsolomon)

---

Top Contributors

[![clintLandrum](https://avatars.githubusercontent.com/u/962010?v=4)](https://github.com/clintLandrum "clintLandrum (1 commits)")[![jessedsolomon](https://avatars.githubusercontent.com/u/43144345?v=4)](https://github.com/jessedsolomon "jessedsolomon (1 commits)")

### Embed Badge

![Health badge](/badges/adair-creative-searching/health.svg)

```
[![Health](https://phpackages.com/badges/adair-creative-searching/health.svg)](https://phpackages.com/packages/adair-creative-searching)
```

###  Alternatives

[awesome-nova/dependent-filter

Dependent filters for Laravel Nova

26190.2k](/packages/awesome-nova-dependent-filter)[algolia/php-dom-parser

A simple tool to turn DOM into Algolia search friendly record objects.

181.8k](/packages/algolia-php-dom-parser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
