PHPackages                             alirezaghasemi/laravel-searchable - 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. alirezaghasemi/laravel-searchable

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

alirezaghasemi/laravel-searchable
=================================

A Laravel package for adding search functionality to models.

1.0.0(3y ago)413MITPHPPHP ^8.0

Since Mar 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/alirezaghasemi/laravelSearchable)[ Packagist](https://packagist.org/packages/alirezaghasemi/laravel-searchable)[ Docs](https://github.com/alirezaghasemi/laravelSearchable)[ RSS](/packages/alirezaghasemi-laravel-searchable/feed)WikiDiscussions main Synced 2d ago

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

laravelSearchable
=================

[](#laravelsearchable)

A Laravel package for adding search functionality to models

Installation :

```
composer require alirezaghasemi/laravel-searchable

```

Usage :

- use `Searchable` trait in your model
- Define `$searchable` property in your model to select which columns to search in

Example (User Model Relation With Post):

```
use AlirezaGhasemi\LaravelSearch\Searchable;

class User extends Model {

  use Searchable ;
  protected $searchable = ['name', 'mobile', 'posts.title','posts.comments.title'];

  public function posts(){
    return $this->hasMany(Post::class);
  }

```

Example (Post Model Relation with Comment):

```
class Post extends Model {

public function comments(){
  return $this->hasMany(Comment::class);
}

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

1195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/da4c5d5ad20d6447bdecd1012f70ae8c78d5cf9a1bc97ed7360b372cfecdadb8?d=identicon)[masih1994](/maintainers/masih1994)

---

Tags

searchlaravelsearchabledynamic-searchmodel\_searchrelation\_searchrelational\_searchautomatically\_search

### Embed Badge

![Health badge](/badges/alirezaghasemi-laravel-searchable/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M617](/packages/laravel-scout)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

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