Laravel devs, level up your JSON attribute handling with this gem! 💎
Use AsArrayObject and AsCollection casts for smarter JSON manipulation. Perfect for directly modifying array offsets without PHP errors.
Pro tip: AsCollection cast gives you full Laravel Collection power!
www.harrisrafto.eu/enhancing-json-attribute-handling-in-laravel-with-asarrayobject-and-ascollection-casts #Laravel
Laravel devs, supercharge your app's observability with this gem! 💎
Use Context to share data across requests, jobs, and logs. Perfect for tracing distributed systems and enhancing log insights.
Pro tip: Great for adding request IDs or user info to all logs.
www.harrisrafto.eu/enhancing-application-insight-with-laravels-context-add-method #Laravel
Laravel devs, filter collections by type with this gem! 💎
Use whereInstanceOf() to keep only items of a specific class. Perfect for processing mixed-type collections or cleaning up polymorphic relations.
Pro tip: Great for handling heterogeneous data structures.
www.harrisrafto.eu/filtering-collections-by-type-mastering-laravels-whereinstanceof-method #Laravel
Laravel devs, add conditional logic to collections with this gem! 💎
Use unless() for inverse conditional operations on collections. Perfect for cleaner, more expressive collection manipulations.
Pro tip: Combine with when() for comprehensive conditional logic.
www.harrisrafto.eu/mastering-conditional-logic-with-laravels-unless-method #Laravel