3 Building Blocks For Any PHP Collection

In this Larabit, you’ll learn some of the core infrastructure for any collection component. If you use Laravel collections, you might understandably take it for granted that you can, for example, count a collection, or loop over it, or interact with it as if it were an array. But these things aren’t magically available. They have to be implemented. Should you need to construct your own collection at some point, I’ll demonstrate the Countable, ArrayAccess, and Traversable interfaces. Watch thousands of programming lessons, track your progress, and participate in a massive Laravel community at Laracasts. Laracasts: Laracasts Twitter: Jeffrey Way Twitter:
Back to Top