PHPackages                             hetparekh21/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. [Database &amp; ORM](/categories/database)
4. /
5. hetparekh21/searchable

ActiveLibrary[Database &amp; ORM](/categories/database)

hetparekh21/searchable
======================

Add simple search functionality to any model

1.0.0(2y ago)11421MITPHPPHP &gt;=8.1

Since Jan 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hetparekh21/Searchable)[ Packagist](https://packagist.org/packages/hetparekh21/searchable)[ RSS](/packages/hetparekh21-searchable/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

hetparekh21/Searchable
======================

[](#hetparekh21searchable)

Effortlessly add search functionality to your Laravel models.

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

[](#installation)

1. Install the package via Composer:

```
composer require hetparekh21/searchable
```

Usage
-----

[](#usage)

1. Use the `Searchable` trait in your model:

```
use hetparekh21\searchable\Searchable;

class User extends Model
{
    use Searchable;

    protected $fillable = [
        'first_name',
        'last_name',
        'email',
        'phone'
    ];

    protected $guarded = ['id'];

    protected $except = ['phone'];

    protected $useGuarded = false;

}
```

2. Perform searches using the `scopeSearch` method:

```
$users = User::search('John Doe')->get();
```

3. Search Paginated, As easy as laravel default queries

```
$users = User::search('John Doe')->paginate(10);
```

Configuration
-------------

[](#configuration)

- **`except` property:** Exclude specific columns from the search (optional).
- **`useGuarded` property:** Include guarded attributes in the search (optional).

Contributing
------------

[](#contributing)

Anyone is welcome to contribute. Fork, make your changes, and then submit a pull request.

License
-------

[](#license)

Searchable is open-sourced software licensed under the MIT license: LICENSE.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

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

905d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18632bcd43327af54c9b728c5b9ad523b46c9b4c48f9f0f428a9e36ff73e9dc1?d=identicon)[Het](/maintainers/Het)

---

Top Contributors

[![hetparekh21](https://avatars.githubusercontent.com/u/70949142?v=4)](https://github.com/hetparekh21 "hetparekh21 (7 commits)")[![MatthewPageUK](https://avatars.githubusercontent.com/u/46349796?v=4)](https://github.com/MatthewPageUK "MatthewPageUK (1 commits)")

---

Tags

searchlaraveldatabasemodeleloquentSimplesearchable

### Embed Badge

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

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

###  Alternatives

[nicolaslopezj/searchable

Eloquent model search trait.

2.0k2.9M37](/packages/nicolaslopezj-searchable)

PHPackages © 2026

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