PHPackages                             php-junior/laravel-global-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. php-junior/laravel-global-search

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

php-junior/laravel-global-search
================================

Search Package For Laravel

v0.0.1(7y ago)36232[1 issues](https://github.com/PHPJunior/laravel-global-search/issues)MITPHPPHP ^7.1.3

Since Sep 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/PHPJunior/laravel-global-search)[ Packagist](https://packagist.org/packages/php-junior/laravel-global-search)[ RSS](/packages/php-junior-laravel-global-search/feed)WikiDiscussions master Synced 2w ago

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

Laravel Global Search \[WIP\]
=============================

[](#laravel-global-search-wip)

Laravel Global Search

[![Latest Stable Version](https://camo.githubusercontent.com/c5baf1edfe6cef798a2b022f156f520471c50f02cf4a3e17f427be3f4b8e9a39/68747470733a2f2f706f7365722e707567782e6f72672f7068702d6a756e696f722f6c61726176656c2d676c6f62616c2d7365617263682f762f737461626c65)](https://packagist.org/packages/php-junior/laravel-global-search)[![Total Downloads](https://camo.githubusercontent.com/e06b118489bcddb2c6b5cca508a6876f24243926d674d9484e28956ddabbe1d7/68747470733a2f2f706f7365722e707567782e6f72672f7068702d6a756e696f722f6c61726176656c2d676c6f62616c2d7365617263682f646f776e6c6f616473)](https://packagist.org/packages/php-junior/laravel-global-search)[![License](https://camo.githubusercontent.com/fd78e0869fb57c72605c91d574093a0fb96d392703d712d63ca0a2aaac036311/68747470733a2f2f706f7365722e707567782e6f72672f7068702d6a756e696f722f6c61726176656c2d676c6f62616c2d7365617263682f6c6963656e7365)](https://packagist.org/packages/php-junior/laravel-global-search)

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

[](#installation)

```
composer require php-junior/laravel-global-search
```

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
PhpJunior\LaravelGlobalSearch\LaravelGlobalSearchProvider::class,
```

```
php artisan vendor:publish --provider="PhpJunior\LaravelGlobalSearch\LaravelGlobalSearchProvider"
```

This is the contents of the published config file:

```
return [
    'resources' => [
        \App\Models\Auth\User::class
    ],
    'limit' => 10
];
```

Usage
-----

[](#usage)

First `PhpJunior\LaravelGlobalSearch\Traits\GlobalSearchable` trait to models

```
use PhpJunior\LaravelGlobalSearch\Traits\GlobalSearchable;

class User extends Authenticatable
{
    use GlobalSearchable;

    /**
     * The columns that should be searched.
     *
     * @var array
     */
    protected  $search = [
        'name', 'email',
    ];

    /**
     * The columns that should be displayed.
     *
     * @var array
     */
    protected $only = [
        'name', 'email'
    ];

    /**
     * The columns that should be ordered.
     *
     * @var array
     */
    protected  $order = [
        'name' => 'desc',
        'email' => 'asc'
    ];

    // Optional
    protected $searchQuery = [
        [
            'method' => 'where',
            'column' => 'email',
            'operator' => '=',
            'value' => 'usern@user.com'
        ],
        [
            'method' => 'whereBetween',
            'column' => 'votes',
            'value' => [1, 100]
        ]
    ];

    /**
     * @var string
     */
    protected $searchIndex = 'users-index';
}
```

Search

```
LaravelGlobalSearch::search($text)
```

Credits
-------

[](#credits)

- All Contributors

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

2834d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2695272c87c7144c984ddf468d380477dc578b617e7da5502eb4e7eff1f6087?d=identicon)[Nyi Nyi Lwin](/maintainers/Nyi%20Nyi%20Lwin)

---

Top Contributors

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

---

Tags

searchlaravelglobal

### Embed Badge

![Health badge](/badges/php-junior-laravel-global-search/health.svg)

```
[![Health](https://phpackages.com/badges/php-junior-laravel-global-search/health.svg)](https://phpackages.com/packages/php-junior-laravel-global-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)
