Prerequirements PHP > 8.0 How To Install composer require abhiaay/php-mongo-query How To Use <?php use Abhiaay\PhpMongoQuery\Aggregation; Aggregation::where('name', 'lorem'); make sure you include the vendor/autoload.php inside your script