PHPackages                             brunoquaresma/laravel-dbsearch - 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. brunoquaresma/laravel-dbsearch

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

brunoquaresma/laravel-dbsearch
==============================

107PHP

Since May 29Pushed 11y ago2 watchersCompare

[ Source](https://github.com/BrunoQuaresma/LaravelDBSearch)[ Packagist](https://packagist.org/packages/brunoquaresma/laravel-dbsearch)[ RSS](/packages/brunoquaresma-laravel-dbsearch/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

LaravelDBSearch
===============

[](#laraveldbsearch)

A simple package for full text search using the Laravel's Eloquent.

1. [Required setup](#required-setup)
2. [Basic usage](#basic-usage)
3. [Use join](#use-join)

### Required setup

[](#required-setup)

In the `require` key of `composer.json` file add the following

```
"brunoquaresma/laravel-dbsearch": "dev-master"

```

Run the Composer update comand

```
$ composer update

```

In your `config/app.php` add `'Brunoquaresma\LaravelDBSearch\LaravelDBSearchServiceProvider'` to the end of the `$providers` array

```
'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Brunoquaresma\LaravelDBSearch\LaravelDBSearchServiceProvider',

),
```

At the end of `config/app.php` add `'LaravelDBSearch' => 'Brunoquaresma\LaravelDBSearch\Facades\LaravelDBSearch'` to the `$aliases` array

```
'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'LaravelDBSearch' => 'Brunoquaresma\LaravelDBSearch\Facades\LaravelDBSearch'

),
```

\###Basic usage

For this example we use a course model.

```
$courses =  LaravelDBSearch::model('Course')
				->field(array('name', 'description'))
				->query('php')
				->get();
```

1. model() - Set the default model for the search.
2. field() - Set the search fields by array or a string value if have only one field.
3. query() - Set the search query value.
4. get() - Get the results of search.

\###Use join

Get the courses where the owner have a name with `John`.

```
$courses =  LaravelDBSearch::model('Course')
				->field(array('name', 'description', 'first_name', 'last_name', 'username'))
				->join('courses.*', 'users', 'courses.user_id', '=', 'users.id')
				->query('John')
				->get();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/brunoquaresma-laravel-dbsearch/health.svg)

```
[![Health](https://phpackages.com/badges/brunoquaresma-laravel-dbsearch/health.svg)](https://phpackages.com/packages/brunoquaresma-laravel-dbsearch)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

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

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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