AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# reject方法 使用指定的回调过滤集合。如果回调返回`true`,就会把对应的项目从集合中移除。 与`filter`放相反 ~~~ $collection = collect([1, 2, 3, 4]); $filtered = $collection->reject(function ($value, $key) { return $value > 2; }); $filtered->all(); // [1, 2] ~~~ 与`reject()`相反的方法,查看[filter](https://ihavenolimitations.xyz/collections/filter.md)方法。