New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

qrstuff/scout-mongodb

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

Larablocks Analysis

qrstuff/scout-mongodb works with Laravel 12 and 13 (latest release 1.0.1, Sep 25, 2025).

Recommendation checks

Use with care

Use with care: meets 1 of 4 checks.

  • Works with Laravel 13, the current version
  • No release in the last 12 months (last: Sep 25, 2025)
  • 582 downloads a month (needs 10,000)
  • 1 GitHub star (needs 100)

State

Quiet
  • Last stable release: Sep 25, 2025.
  • No releases in the last 12 months.
  • First released: Sep 25, 2025.
  • Monthly downloads: 582.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 5, 2026.

Install
composer require qrstuff/scout-mongodb
Latest Version:1.0.1
PHP:>=7.4
Laravel:12 · 13
License:MIT
Last Updated:Sep 25, 2025
Links: GitHub  ·  Packagist
Maintainer: vaibhavqrcg

qrstuff/scout-mongodb

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

Latest Version Downloads PHP Version License

Installation

composer require qrstuff/scout-mongodb

Usage

Before following this guide, make sure you have installed and set up laravel/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

See LICENSE file.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
1.0.1 >=7.4 MIT
1.0.0 >=7.4 MIT