Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 laravel 的新手。我在获取以下对象时遇到问题:具有评论 > 2 的项目。
只是要清楚。一项有很多评论。
$items = $items->filter(function($item) { return $item->comments()->count() > 2; });