Laravel 5 Collections: Adding New Elements to a Collection With put
The put method is used to add a new item to the collection with a given $key and $value . The put method modifies the original Collection instance and returns a reference to it.1 public function put ( 2 $ key , 3 $ value 4 ) ;The following code...