Laravel 5 Collections: Removing a Portion of a Collection With splice
The splice method is a useful 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 $offset tells the splice method where to begin when...