Palzin Track
Get 15% off with code PTRACKSIGNUP15 

Laravel Diary Logo

Laravel Collection Public API: prepend

The prepend method adds a given value to the beginning of a collection. Optionally, you can specify a key for the new value when adding to an associative array. The method returns a reference to the original collection. Here is an example of using prepend to add an item to a collection: $collection->prepend('Select a shirt size'); When supplying an argument...