Laravel's collection class is truly wonderful. It contains a lot of handy methods and you can create some very elegant code with it. In client projects I found myself adding the same macro's over and over again. That's why my colleague Seb and I took some time to create a package aptly called Laravel-collection-macros that contains those macros.

Features

  • Pass a second parameter to be used as a fallback
  • Retrieve item at the second index
  • Documentation available
  • Pass a second parameter to be used as a fallback
  • Chunks the values from a collection into groups as long the given callback is true
  • Create a Paginator instance for the items in the collection

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Laravel collection macros

Laravel collection macros Web Site

You Might Also Like
Full Control for Complex IT - Try PRTG Now Icon
Full Control for Complex IT - Try PRTG Now

Gain deeper insights and proactive alerts for your entire network. PRTG empowers you to optimize uptime and prevent costly outages.

As an IT monitoring expert, you need more than basic alerts - you need actionable data and full transparency. PRTG gives your team a single pane of glass for all systems, devices, and applications, with customizable dashboards and granular user management. Detect issues before they escalate, automate reporting, and ensure compliance with SLAs. PRTG’s scalable engine and advanced analytics help you optimize resources, reduce manual effort, and keep your organization running smoothly. Take control of your IT landscape and make smarter decisions with real-time, enterprise-grade monitoring.
Activate Your PRTG Trial Today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel collection macros!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Libraries

Registered

2024-04-11