PHPackages                             zesty-bus/laravel-simple-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. zesty-bus/laravel-simple-search

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

zesty-bus/laravel-simple-search
===============================

A simple wildcard search on eloquent models.

2.0.1(3y ago)21051[1 issues](https://github.com/zesty-bus/laravel-simple-search/issues)MITPHP

Since May 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/zesty-bus/laravel-simple-search)[ Packagist](https://packagist.org/packages/zesty-bus/laravel-simple-search)[ Docs](https://github.com/zesty-bus/laravel-simple-search)[ RSS](/packages/zesty-bus-laravel-simple-search/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Laravel Simple Search
=====================

[](#laravel-simple-search)

A simple wildcard search on eloquent models.

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

[](#installation)

Via Composer

```
composer require zesty-bus/laravel-simple-search
```

Usage
-----

[](#usage)

### Preparing your models

[](#preparing-your-models)

Add a searchable property. These are the table columns you'll be searching on. If the model has a relationship, you can use dot notation to determine the path.

```
namespace App\Models;

class Post extends Model
{
    protected $searchable = [
        'name', 'body', 'category.name'
    ];

    public function category()
    {
        return $this->hasOne(Category::class);
    }
}
```

### Searching

[](#searching)

To run a search use the search() method on your queries.

```
$posts = Post::search($request->query)->get();
```

You can override the default search columns by passing an array.

```
$posts = Post::search($request->query, ['name'])->get();
```

### Config

[](#config)

You may want to change the search method name or the search property name on your models. First, publish the config.

```
php artisan vendor:publish --provider="ZestyBus\LaravelSimpleSearch\LaravelSimpleSearchServiceProvider" --tag="config"
```

Simply change the method name or property name to something that suits your requirements.

```
return [

    /**
     *  Name of the eloquent builder method.
     */
    'method' => 'filter',

    /**
     *  Name of the models public searchable property.
     */
    'property' => 'filterable'
];
```

```
$posts = Post::filter($request->query, ['name'])->get();
```

```
namespace App\Models;

class Post extends Model
{
    protected $filterable = [
        'name', 'body', 'category.name'
    ];

    public function category()
    {
        return $this->hasOne(Category::class);
    }
}
```

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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 ~125 days

Total

4

Last Release

1458d ago

Major Versions

1.1.0 → 2.0.02021-10-06

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

searchlaravelSimplesearchinglaravel-simple-search

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zesty-bus-laravel-simple-search/health.svg)

```
[![Health](https://phpackages.com/badges/zesty-bus-laravel-simple-search/health.svg)](https://phpackages.com/packages/zesty-bus-laravel-simple-search)
```

###  Alternatives

[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[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)
