PHP Package: spatie/laravel-query-builder

Spatie's Laravel Query Builder library provides powerful search capabilities with easy-to-use query building for Laravel applications.

Current Version: 6.3.5
Last Updated: 2025-08-04
PHP Requirement: ^8.2
Dependencies:
illuminate/database
illuminate/support
⚠️ To ensure full functionality, the above dependencies might be required.

Package Description

Laravel Query Builder by Spatie is a robust library enhancing the search functionality of Laravel projects. It allows complex query constructions with ease, optimizing database search operations. With support for filtering, sorting, and including relationships, this tool simplifies data retrieval processes for developers. Employing this library ensures efficient and scalable search functionalities, enhancing the overall performance of Laravel applications.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 6.3.5

Download Download v6.3.5

Previous Versions

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com
require_once 'libs/spatie/laravel-query-builder/6.3.5/loader.php';
require_once 'libs/illuminate/database/12.33.0/loader.php';
require_once 'libs/illuminate/support/12.33.0/loader.php';

use Spatie\QueryBuilder\QueryBuilder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;

$obj = new QueryBuilder();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.