Support the ongoing development of Laravel.io →
Jonas Staudenmeir

Jonas Staudenmeir

Joined 5 Jun 2018

Statistics

Threads 0
Replies 8
Solutions 1
Articles 0

staudenmeir has not posted any threads yet

replied 7 years ago

Laravel Search WHereHas JUST when has Value

Did you try $query->whereHas( instead of ->IfWhereHas(?

0 Likes
Solved
replied 7 years ago

how to change query type of eloquent with method

I created a package to fix this problem: https://github.com/staudenmeir/eloquent-param-limit-fix

0 Likes
replied 7 years ago

Getting relation subquery

It's a bit hacky, but it works: Category::withCount(['translation as title' => function($query) {...

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2026 Laravel.io - All rights reserved.