PHPackages                             rrkhatri/laravel-keywordable - 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. rrkhatri/laravel-keywordable

ActiveLibrary

rrkhatri/laravel-keywordable
============================

Add keywords on model and filter models using keywords.

221PHP

Since Nov 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/rrkhatri/laravel-keywordable)[ Packagist](https://packagist.org/packages/rrkhatri/laravel-keywordable)[ RSS](/packages/rrkhatri-laravel-keywordable/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Keywordable
===================

[](#laravel-keywordable)

This package is used to bind searchable keywords on model. Which you can directly use in your query.

Setup:
------

[](#setup)

Publish model &amp; trait by executing below command.

> php artisan vendor:publish --provider="RrKhatri\\Keywordable\\KeywordServiceProvider"

Migrate keywords table

> php artisan migrate

Usage:
------

[](#usage)

- `Keywordable` trait should be added on model.
- Sync keywords on model.

```
$model->syncKeywords("laravel", "coder"); // ["laravel", "coder"] -> both will work.
```

- Search models having matching keywords.

```
$query->havingKeywords("lara", "co"); // orHavingKeywords -> to apply filter as OR.
```

- Find models having exact keywords.

```
$query->havingExactKeywords("laravel", "coder"); // orHavingExactKeywords -> to apply filter as OR.
```

- Remove keywords from model.

```
$model->removeKeywords(); // will remove all keywords.
$model->removeKeywords("laravel"); // will remove specified keyword(s).
```

Licence
-------

[](#licence)

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/rrkhatri/laravel-keywordable) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

[![Buy us a tree](https://camo.githubusercontent.com/15453546808b5ea47b48633f72f490420e2e41b885556eee95d7e88f4a754418/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e3f7374796c653d666f722d7468652d6261646765)](https://plant.treeware.earth/rrkhatri/laravel-keywordable)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 97.2% 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://www.gravatar.com/avatar/671415f875ec66bd5e0a6d5aab74610bba3f663564b3e4e4072eaac25b2b06c9?d=identicon)[rrkhatri](/maintainers/rrkhatri)

---

Top Contributors

[![rrkhatri](https://avatars.githubusercontent.com/u/41507679?v=4)](https://github.com/rrkhatri "rrkhatri (35 commits)")[![rohan-khatri](https://avatars.githubusercontent.com/u/54662566?v=4)](https://github.com/rohan-khatri "rohan-khatri (1 commits)")

### Embed Badge

![Health badge](/badges/rrkhatri-laravel-keywordable/health.svg)

```
[![Health](https://phpackages.com/badges/rrkhatri-laravel-keywordable/health.svg)](https://phpackages.com/packages/rrkhatri-laravel-keywordable)
```

PHPackages © 2026

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