PHPackages                             uteq/laravel-query-builder-macros - 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. uteq/laravel-query-builder-macros

ActiveLibrary

uteq/laravel-query-builder-macros
=================================

A set of common Laravel Uteq helpers and macros

1.0.8(3y ago)201.5k11MITPHPPHP ^8.0

Since Mar 25Pushed 3y agoCompare

[ Source](https://github.com/uteq/laravel-query-builder-macros)[ Packagist](https://packagist.org/packages/uteq/laravel-query-builder-macros)[ Docs](https://github.com/uteq/query-builder-macros)[ RSS](/packages/uteq-laravel-query-builder-macros/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (10)Used By (1)

A set of useful macros for the query builder
============================================

[](#a-set-of-useful-macros-for-the-query-builder)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d93f26a89dc8c18c065ccacdb574ea2da5273770f9e92617841d8b629de8b07a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f757465712f6c61726176656c2d71756572792d6275696c6465722d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uteq/laravel-query-builder-macros)[![Run tests](https://github.com/uteq/laravel-query-builder-macros/workflows/run-tests/badge.svg)](https://github.com/uteq/laravel-query-builder-macros/workflows/run-tests/badge.svg)[![Check & fix styling](https://github.com/uteq/laravel-query-builder-macros/workflows/Check%20&%20fix%20styling/badge.svg)](https://github.com/uteq/laravel-query-builder-macros/workflows/Check%20&%20fix%20styling/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/d543fde9ca820eb1330c0027791954992338b2c30b1aca58e7cd2c6391220095/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f757465712f6c61726176656c2d71756572792d6275696c6465722d6d6163726f732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/uteq/laravel-query-builder-macros)

Adds useful functionality to the Laravel Query Builder `Illuminate\Database\Query\Builder`.

Installation
------------

[](#installation)

```
composer require uteq/laravel-query-builder-macros
```

Or add the Uteq Laravel Support package

```
composer require uteq/laravel-support
```

### `rawQuery`

[](#rawquery)

```
$rawQuery = Account::query()
    ->where('email', 'john')
    ->getQuery() // You need to do this to get the rawQuery
    ->rawQuery();
// return `select * from "account" where "email" = 'john'`
```

### `ddQuery`

[](#ddquery)

```
Account::query()
    ->where('email', 'john')
    ->ddQuery();
// dd() of `select * from "account" where "email" = 'john'`
```

### `dumpQuery`

[](#dumpquery)

```
Account::query()
    ->where('email', 'john')
    ->dumpQuery();
// dump() of `select * from "account" where "email" = 'john'`
//  the execution of the script will continue
```

### `rayQuery`

[](#rayquery)

```
Account::query()
    ->where('email', 'john')
    ->rayQuery();
// ray() of `select * from "account" where "email" = 'john'`
//  the execution of the script will continue
```

Inspiration by
--------------

[](#inspiration-by)

Building this package I got inspired by the following:

-
-
-

Credits
-------

[](#credits)

- [Nathan Jansen](https://github.com/nathanjansen)
- [Leo Flapper](https://github.com/leoflapper)
- [All Contributors](../../contributors)

Testing
-------

[](#testing)

```
$ composer test
```

About Uteq
----------

[](#about-uteq)

We are a web development agency based in the Netherlands. We design and build web applications for our clients. We are specialized in Laravel with Livewire.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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.

###  Release Activity

Cadence

Every ~0 days

Total

9

Last Release

1143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e9390c24b53926dfe0f57b44d2b09cce785f2295dadee3654d940d71cd3ec20?d=identicon)[uteq](/maintainers/uteq)

---

Top Contributors

[![nathanjansen](https://avatars.githubusercontent.com/u/73473323?v=4)](https://github.com/nathanjansen "nathanjansen (25 commits)")

---

Tags

uteqquery-builder-macros

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/uteq-laravel-query-builder-macros/health.svg)

```
[![Health](https://phpackages.com/badges/uteq-laravel-query-builder-macros/health.svg)](https://phpackages.com/packages/uteq-laravel-query-builder-macros)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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