Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Postgresql Distinct On

Postgresql Distinct On Laravel Package

datajoe/postgresql-distinct-on

Adds PostgreSQL DISTINCT ON support to Laravel's query builder and Eloquent, so you can fetch the first row per group with a clean, chainable API. Ideal for latest-per-user or per-category queries without raw SQL or subqueries.

View on GitHub
Deep Wiki
Context7

datajoe/postgresql-distinct-on adds first-class support for PostgreSQL's DISTINCT ON clause to Laravel's Eloquent and query builder. It lets you fetch the first row per group—such as the latest order per customer—without raw SQL, subqueries, or window functions.

  • Chainable distinctOn() method on query and Eloquent builders
  • Supports one or many columns with correct ORDER BY handling
  • Works with where, joins, scopes, and relationships
  • Clean, readable alternative to GROUP BY workarounds
  • Lightweight and framework-native, with no extra dependencies
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core