public function search($value, $strict = false)
    {
        if (! $this->useAsCallable($value)) {
            return array_search($value, $this->items, $strict);
        }

        foreach ($this->items as $key => $item) {
            if (call_user_func($value, $item, $key)) {
                return $key;
            }
        }

        return false;
    }
public function search($value, $strict = false)
    {
        if (! $this->useAsCallable($value)) {
            return array_search($value, $this->items, $strict);
        }

        foreach ($this->items as $key => $item) {
            if (call_user_func($value, $item, $key)) {
                return $key;
            }
        }

        return false;
    }
public function search ( $ value , $ strict = false ) { if ( ! $ this -> useAsCallable ( $ value ) ) { return array_search ( $ value , $ this -> items , $ strict ) ; } foreach ( $ this -> items as $ key => $ item ) { if ( call_user_func ( $ value , $ item , $ key ) ) { return $ key ; } } return false ; }
Search the collection for a given value and return the corresponding key if successful.

@param  mixed  $value
@param  bool  $strict
@return mixed
Search the collection for a given value and return the corresponding key if successful .