What are laravel collections ?

Laravel collections are one of the most powerful provisions of the Laravel framework. They are what PHP arrays should be, but in better way.

The Illuminate\Support\Collection class provides a convenient wrapper for working with arrays.

The Collection class implements some PHP and Laravel interfaces such as :-

  • ArrayAccess – Interface to provide accessing objects as arrays.
  • IteratorAggregate – Interface to create an external Iterator.
  • JsonSerializable

Read More

Leave a Reply

Your email address will not be published. Required fields are marked *