Skip to content

Commit eb6ea2d

Browse files
committed
Merge branch 'add_any_to_collection' of https://github.com/paras-malhotra/framework into paras-malhotra-add_any_to_collection
2 parents cfee902 + 5e47cb6 commit eb6ea2d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Illuminate/Support/Collection.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,19 @@ public function contains($key, $operator = null, $value = null)
261261
return $this->contains($this->operatorForWhere(...func_get_args()));
262262
}
263263

264+
/**
265+
* Alias for the "contains" method.
266+
*
267+
* @param mixed $key
268+
* @param mixed $operator
269+
* @param mixed $value
270+
* @return bool
271+
*/
272+
public function some($key, $operator = null, $value = null)
273+
{
274+
return $this->contains($key, $operator, $value);
275+
}
276+
264277
/**
265278
* Determine if an item exists in the collection using strict comparison.
266279
*

0 commit comments

Comments
 (0)