PHPackages                             artvys/cake-search - 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. artvys/cake-search

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

artvys/cake-search
==================

CakePHP adapter for artvys/search package

1.0.0(3y ago)03MITPHPPHP ^8.1

Since May 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dtokos/php-cake-search)[ Packagist](https://packagist.org/packages/artvys/cake-search)[ RSS](/packages/artvys-cake-search/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

artvys/cake-search
==================

[](#artvyscake-search)

This package is [CakePHP](https://cakephp.org) adapter for the package [artvys/search](https://github.com/dtokos/php-search). It provides few boilerplate classes to make integration with framework breeze.

1. Installation
===============

[](#1-installation)

This section describes installation of this package. If you have [composer](https://getcomposer.org) installed, then simply run:

```
composer require artvys/cake-search
```

You **don't** need to install the core package separately. It will be installed automatically.

2. Implementing your [TableSearchSource](src/Engines/Compiled/SearchSources/Table/TableSearchSource.php)
========================================================================================================

[](#2-implementing-your-tablesearchsource)

This package provides you base class [TableSearchSource](src/Engines/Compiled/SearchSources/Table/TableSearchSource.php)that includes boilerplate code for searching in [Table](https://book.cakephp.org/4/en/orm/table-objects.html) classes from [CakePHP](https://cakephp.org).

To use it, you need to extend it and implement 3 abstract methods:

```
use App\Model\Entity\Article;
use Artvys\Search\Cake\Engines\Compiled\SearchSources\Table\TableSearchSource;

class ArticlesTableSearchSource extends TableSearchSource {
    protected function table(): Table {
        return TableRegistry::getTableLocator()->get('Articles');
    }

    protected function fields(SearchFieldBuilder $builder, CompiledQuery $query, int $limit): void {
        $builder->add(Field::contains('title'))
            ->add(Field::contains('body'));
    }

    protected function makeResultMapper(): callable {
        return fn(Article $a) => SearchResult::make($a->title, $a->body, Router::url(['controller' => 'Articles', 'action' => 'edit']));
    }
}
```

Those methods do 3 simple things. You need to specify which `Table` will be searched, which columns will be used and how to convert instances of entities to `SearchResult`. Please note that you don't need to use `TableRegistry` or `Router`directly. You can inject your dependencies and then just return them in those required methods.

Take look through the base classes. They contain a lot of little methods meant for extension and can prove to be quite handy for a lot of common use cases.

3. Where to go from here?
=========================

[](#3-where-to-go-from-here)

The rest of the documentation can be found in the core package [artvys/search](https://github.com/dtokos/php-search).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1097d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/57965308bee7ada1d2347000845e26aea7a6712808363fae46c3127c14bd1dd9?d=identicon)[dtokos](/maintainers/dtokos)

---

Top Contributors

[![dtokos](https://avatars.githubusercontent.com/u/16812763?v=4)](https://github.com/dtokos "dtokos (4 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/artvys-cake-search/health.svg)

```
[![Health](https://phpackages.com/badges/artvys-cake-search/health.svg)](https://phpackages.com/packages/artvys-cake-search)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[friendsofcake/search

CakePHP Search plugin using PRG pattern

1742.0M37](/packages/friendsofcake-search)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)[handcraftedinthealps/zendsearch

a general purpose text search engine written entirely in PHP 5

39921.0k35](/packages/handcraftedinthealps-zendsearch)

PHPackages © 2026

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