cleentfaar/decorator
Laravel/PHP decorator helper to wrap classes and add behavior without modifying the original. Provides a lightweight Decorator pattern implementation for cleaner, composable enhancements and feature extensions in your application.
Str::ucfirst(), Carbon, collect()) and packages like spatie/array-to-xml for similar needs.array_walk_recursive without type safety).spatie/array-to-xml, nesbot/carbon, or custom decorators via traits).collect() for transformations.@php blocks) for templates.TextDecorator).@decorate($value, 'uppercase')).Response::json($decoratedData)).ucfirst, truncate) with Laravel’s Str:: helpers.monolog or symfony/console).collect()->map()).Cache::remember.// Instead of:
$decorated = (new TextDecorator)->uppercase($text);
// Use:
$text = Str::upper($text);
How can I help you explore Laravel packages today?