Lessons

Laravel Collections – collapse() Method
In this post, we will learn about one of my favorite Laravel Collection's method called collapse(). The collapse() method can be used to convert a multi-dimensional collection into a single dimension collection. In simple words, this...
0 Comments
Laravel Collections – times() Method
In this post, we will look at how we can use the times() method to quickly create numbers of Laravel Collections. The times() method of Laravel Collection is similar to PHP's range() function with some extra functionality for...
0 Comments
Laravel Collections – map() Method
In this post, we will look at how we can use map() method to perform some action on each element of Laravel Collections. The map method applies a given callback function to each element of a collection. The callback function will modify...
0 Comments
Laravel Collections – wrap and unwrap methods
In this post, we will look at how wrap() and unwrap() methods can be used when dealing with Laravel Collections. This is a third part of Laravel Collections Series. wrap() Method As I discussed in previous post that the make() method...
0 Comments
Laravel Collections - make Method
Laravel Collections Illuminate\Support\Collection class provides number of static helper functions that help us to create new instance of collection. Static API's make method creates a new instance of a collection with the provided...
0 Comments
Page 1 of 2