PHPackages                             advancelearn/search-elequent - 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. advancelearn/search-elequent

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

advancelearn/search-elequent
============================

By installing this package, you can easily search in ElQuent Laravel, even between nested relations

1.0.1(2y ago)13MITPHPPHP ^8.0.2

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Saberqadimi/SearchAble)[ Packagist](https://packagist.org/packages/advancelearn/search-elequent)[ RSS](/packages/advancelearn-search-elequent/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Advancelearn Searchable package
===============================

[](#advancelearn-searchable-package)

[![advancelearn/search-elequent](https://camo.githubusercontent.com/ecd481d9d40bf63d80fef3412dc4384ea32db81bbb675cc1a391b4b7111c91b8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f616476616e63656c6561726e2532467365617263682d656c657175656e742e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616476616e63656c6561726e2532467365617263682d656c657175656e74267061747465726e3d746f706f677261706879267374796c653d7374796c655f31266465736372697074696f6e3d42792b696e7374616c6c696e672b746869732b7061636b6167652532432b796f752b63616e2b656173696c792b7365617263682b696e2b456c5175656e742b4c61726176656c2532432b6576656e2b6265747765656e2b6e65737465642b72656c6174696f6e73266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d333530)](https://camo.githubusercontent.com/ecd481d9d40bf63d80fef3412dc4384ea32db81bbb675cc1a391b4b7111c91b8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f616476616e63656c6561726e2532467365617263682d656c657175656e742e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d616476616e63656c6561726e2532467365617263682d656c657175656e74267061747465726e3d746f706f677261706879267374796c653d7374796c655f31266465736372697074696f6e3d42792b696e7374616c6c696e672b746869732b7061636b6167652532432b796f752b63616e2b656173696c792b7365617263682b696e2b456c5175656e742b4c61726176656c2532432b6576656e2b6265747765656e2b6e65737465642b72656c6174696f6e73266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667267769647468733d333530)

- [English documents](README.md)
- [داکیومنت فارسی](README-FA.md)

Introduction
------------

[](#introduction)

By installing this package, you can easily search the values and columns of each model You can use this package in your Laravel projects

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

[](#installation)

You can install the package with this command

```
composer require advancelearn/search-elequent
```

Now you can add the desired trait in any of the models that you want to be searchable

```
use Advancelearn\SearchElequent\Searchable;

class Order extends Model
{

    use Searchable;

    /**
     * Scope to perform a search operation.
     *
     * @param \Illuminate\Database\Query\Builder $query
     * @param string $searchText
     * @return \Illuminate\Database\Query\Builder
     */
    public function scopeSearch($query, string $searchText)
    {
        $searchColumns = ['order_number'];
        $relationColumns = [
            'address.user' => ['email'] // Nested relationship with address and user
        ];
        return $this->search($query, $searchText, $searchColumns, $relationColumns);
    }

    /**
     * Define the address relationship.
     *
     * @return \Illuminate\Database\Eloquent\Relations\Relation
     */
    public function address()
    {
        // Define your address relationship logic here
    }

}
```

And for example, you can call this scope in your controller and pass the searched value to it:

```
$searchText = $request->q; // 'DE1253005'
// $searchText2 = "info@gmail.com";
return Order::search($searchText)->get();
```

Conclusion
----------

[](#conclusion)

The package you created to add search functionality to Eloquent models is a powerful tool in software development. Using this package, you will be able to perform complex searches in models as well as in tabular and relational relationships of models.

Among the main features of this package, the following can be mentioned:

Ease of use: By defining a simple scope in Eloquent models, this package provides the possibility of performing complex searches easily.

Support for relationships: You can also access tabular and relational relationships of models in your searches, which makes it possible to search for data related to a model.

Extensibility: This package allows you to add search features to all your Eloquent models, so you can create different searches based on your needs and match the unique features of your system.

Improved efficiency: With the ability to search the database based on specific conditions, you can quickly retrieve the data you need and improve the efficiency of your system.

By using this package, improve the ability to search and filter your data and make Laravel software development more simple and efficient.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1008d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/83162836?v=4)[Saber Qadimi](/maintainers/Saberqadimi)[@Saberqadimi](https://github.com/Saberqadimi)

---

Top Contributors

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

---

Tags

searchlaraveleloquent

### Embed Badge

![Health badge](/badges/advancelearn-search-elequent/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[mozex/laravel-scout-bulk-actions

Import, flush, and queue-import all your Laravel Scout searchable models at once. Auto-discovers models, runs in bulk, tracks progress.

1539.3k](/packages/mozex-laravel-scout-bulk-actions)[waad/laravel-model-metadata

A robust Laravel package for handling metadata with JSON casting, custom relation names, and advanced querying capabilities.

854.6k](/packages/waad-laravel-model-metadata)

PHPackages © 2026

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