🔥 Laravel Tip: You can filter by the relationship count with the `has` method
Dec 6, 2022
For example, get only posts that have at least 10 comments.
You can also combine this with a callback to specify more custom filters.
ex: get posts with more than 3 comments to form the current user.
You can also combine this with a callback to specify more custom filters.
ex: get posts with more than 3 comments to form the current user.
![tip-image-0](https://res.cloudinary.com/dpmeu3otn/image/upload/v1670290341/tips/c1aavpzzkomtzyxvhlkb.png)
Other tips:
🔥 Laravel Tip: Accessor Caching
Apr 13, 2022