PHPackages                             mirhamit/miri-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. mirhamit/miri-search

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

mirhamit/miri-search
====================

A Minimal Laravel Search Package

1.0.1(4y ago)076MITPHP

Since Apr 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/MirHamit/miriSearch)[ Packagist](https://packagist.org/packages/mirhamit/miri-search)[ RSS](/packages/mirhamit-miri-search/feed)WikiDiscussions main Synced today

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

MirHamit/MiriSearch
===================

[](#mirhamitmirisearch)

[![Latest Version on Packagist](https://camo.githubusercontent.com/38e43fb2bacbf3760cb2b81e01caaebb2d9376a931391f556546a22ac680c166/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76656e646f725f736c75672f7061636b6167655f736c75672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mirhamit/mirisearch)[![Total Downloads](https://camo.githubusercontent.com/b09234c7d6775bd20a4055a6563fa0654aae4e7b24de06da4cd940291a0438b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76656e646f725f736c75672f7061636b6167655f736c75672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mirhamit/mirisearch)

---

A Minimal Laravel Search Package

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

[](#installation)

open terminal and cd to your project root folder

install laravel

Install this package with composer

```
composer require mirhamit/miri-search
```

---

Usage
-----

[](#usage)

Add MiriSearch to your user model in this example we used User model, you can use in any model

```
use MirHamit\MiriSearch\MiriSearch;

class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable, MiriSearch;
...
}
```

Get your search In this example we used in route and searched a signle user

```
Route::get('search', function () {
    return User::miriSearch(['w1w@yahoo.com'], 0, 0)->paginate();
});
```

even you can search in a relation :

```
    return User::search('w1w@yahoo.com')
        ->query(fn($query) => $query->with([
            'warehouse' => function ($query) {
                // $query->miriSearch(['code'=>'5488', 'phone'=>'+9891413'], 1, 1);
                // $query->miriSearch('Search', 1, 0);
                $query->miriSearch(['test', '6897'], 1, 1);
            }
        ]))
        ->paginate()
```

The second and third parameter of search accepts boolean If you send 0 to second parameter, search will search with exact word of search

If you send 1 to second parameter, search will search with `LIKE` for example `$query->where($searchableField, "LIKE", "%$value%");`

If you send 0 to third parameter, search will search with `orWhere`

If you send 1 to third parameter, search will search with `where`

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

---

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review and check security vulnerabilities and report them in issues section.

---

Credits
-------

[](#credits)

- [Həmid Musəvi](https://github.com/mirhamit)
- [All Contributors](../../contributors)

---

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Every ~21 days

Total

2

Last Release

1473d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

searchlaravelMirHamit

### Embed Badge

![Health badge](/badges/mirhamit-miri-search/health.svg)

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

###  Alternatives

[remoblaser/search

A simple to implement Search for your Application

101.5k](/packages/remoblaser-search)

PHPackages © 2026

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