Laravel Collection Public API: splice
splice($offset, $length = null, $replacement = []) The splice method is a versatile method; it is often used to remove a portion of a collection and return the removed section. It defines three parameters: $offset , $length and $replacement . The...