$collection->indexOf($needle)

Tries to find the index number for the given element

  • $needle (mixed)
    the element to search for
  • return (mixed)
    the name of the key or false