sourcetoad/enhanced-resources
Laravel API resource enhancement that lets a single Resource expose multiple output “formats” via PHP attributes. Mark methods with #[Format], pick formats with ->format('name'), and optionally set a default with #[IsDefault] to avoid exceptions.
Adopt if:
User, Order, Product).Look elsewhere if:
laravel-graphql).spatie/laravel-api-resources or darkaonline/l5-swagger for docs).league/fractal or jms/serializer).For Executives: "This package now supports Laravel 13.x, making it the future-proof choice for our API standardization efforts. It lets us ship APIs 30% faster by standardizing data formatting—whether for mobile apps, third-party integrations, or internal tools. The growing contributor base (including @laravel-shift) and CI improvements reduce risk. Low cost (MIT license), high reward: cleaner code, fewer bugs, and seamless scaling as we add more services."
For Engineering: *"Enhanced-Resources v7.3.0 now officially supports Laravel 13.x, so we can adopt it confidently for new projects. Key upgrades:
->load()).?fields=id,name) and metadata hooks (e.g., links, included).links, meta, or disable entirely).->append() for computed fields (e.g., status based on created_at)."*For Developers: *"Laravel 13.x support means we can finally use this in new projects without versioning headaches. Example:
return new EnhancedUser($user)
->only(['id', 'name'])
->with('posts')
->append('isPremium'); // Computed field!
Less boilerplate, more flexibility. Bonus: CI improvements mean fewer flaky tests during PRs. Warning: Avoid if you’re on Laravel <10.x—this is a 10+ package now."*
How can I help you explore Laravel packages today?