PHPackages                             qrstuff/scout-mongodb - 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. qrstuff/scout-mongodb

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

qrstuff/scout-mongodb
=====================

MongoDB (not MongoDB Atlas) engine for the Laravel Scout search.

1.0.1(7mo ago)1133MITPHPPHP &gt;=7.4

Since Sep 25Pushed 7mo agoCompare

[ Source](https://github.com/qrstuff/scout-mongodb)[ Packagist](https://packagist.org/packages/qrstuff/scout-mongodb)[ RSS](/packages/qrstuff-scout-mongodb/feed)WikiDiscussions main Synced 1mo ago

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

qrstuff/scout-mongodb
=====================

[](#qrstuffscout-mongodb)

[MongoDB](https://www.mongodb.com/) (not MongoDB Atlas) engine for the [Laravel Scout](https://laravel.com/docs/scout) search.

[![Latest Version](https://camo.githubusercontent.com/7012eb5dffd55a4a45be635dbe304603b1baeea20b38a9b5d3648f6aee66fbb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f717273747566662f73636f75742d6d6f6e676f64622e7376673f7374796c653d666c61742d737175617265)](https://github.com/qrstuff/scout-mongodb/releases)[![Downloads](https://camo.githubusercontent.com/9be55c8c1d059c74e63fbc558f98cdc756fe0bfd274e2e53c18c82b1128e5705/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f717273747566662f73636f75742d6d6f6e676f64622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/qrstuff/scout-mongodb)[![PHP Version](https://camo.githubusercontent.com/73f404432857507947bdc98c660ee51ea0029bba3a32bd0fd0fdf7ed1c9afa23/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e342b2d3838393262652e7376673f7374796c653d666c61742d737175617265)](https://www.php.net/downloads)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

### Installation

[](#installation)

```
composer require qrstuff/scout-mongodb
```

### Usage

[](#usage)

Before following this guide, make sure you have installed and set up [laravel/scout](https://laravel.com/docs/scout) in your project already.

In your `config/database.php`, add the mongodb connection:

```
return [

    // other stuff

    'connections' => [

        // other stuff

        'mongodb' => [
            'driver' => 'mongodb',
            'dsn' => env('MONGODB_URL'),
            'database' => env('MONGODB_DATABASE', 'example'),
        ],

    ],

    // other stuff

];
```

In your `config/scout.php`, add the mongodb definition:

```
return [

    // other stuff

    'mongodb' => [
        'connection' => env('SCOUT_MONGODB_CONNECTION', 'mongodb'),
        'index-settings' => [
            // App\Models\User::class => [
            //     'searchableAttributes'=> ['name', 'email', 'phone'],
            //     'filterableAttributes'=> [['country' => 1]], // 1 = ASC, 2 = DESC
            // ],
        ],
    ],

    // other stuff

];
```

Then add the `Searchable` trait your model classes as follows:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;

class Customer extends Model
{
    use Searchable; // include the trait
}
```

You can now search across your models as below:

```
use App\Models\Customer;

$customersInIndia = Customer::search('vpz')->where('country', 'IN')->get();
```

### License

[](#license)

See [LICENSE](LICENSE) file.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance63

Regular maintenance activity

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bace1b84aa258987565131816b85656e1b760d1c18a3331facb314b57469333?d=identicon)[vaibhavqrcg](/maintainers/vaibhavqrcg)

---

Tags

laravelmongomongodbscoutsearchsearch-engine

### Embed Badge

![Health badge](/badges/qrstuff-scout-mongodb/health.svg)

```
[![Health](https://phpackages.com/badges/qrstuff-scout-mongodb/health.svg)](https://phpackages.com/packages/qrstuff-scout-mongodb)
```

###  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)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

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

a general purpose text search engine written entirely in PHP 5

39921.0k35](/packages/handcraftedinthealps-zendsearch)

PHPackages © 2026

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