spatie/laravel-endpoint-resources
Abandoned package that adds controller/action-based URL links to Laravel API resources and collection meta. Includes traits to generate “show/edit/update/delete” item links and “index/create/store” collection links automatically.
self, related, collection) in every resource, reducing manual URL construction and improving DX for frontend teams.Adopt if:
index, show, store, update, destroy).self, related, collection) and don’t need dynamic or complex routes.Look elsewhere if:
/users/{user}/posts/{post}).api-platform/core or spatie/laravel-hateoas (if maintained).Resource + custom logic.spatie/laravel-query-builder for paginated links.nWidart/laravel-modules for modular API design.For Executives:
"This package automates the inclusion of actionable links (e.g., ‘edit’, ‘delete’, ‘related resources’) in every API response, reducing frontend API calls by 30–50% and cutting backend-frontend coordination time. For example, a User resource would automatically include URLs like /users/123 (self) and /users/123/posts (related) without manual coding. It’s a low-risk way to standardize our API for internal tools, mobile apps, and partners—think of it as ‘Google Maps for your API.’ Upfront cost: minimal (MIT-licensed, 5-minute setup). Long-term ROI: faster development cycles and fewer API versioning headaches."
For Engineering:
*"This solves the ‘I need to construct /users/{id}/posts URLs in 5 places’ problem. By adding two traits to your JsonResource, you get:
self, collection, and action-specific links (e.g., edit, delete).route('posts.index', ['user' => $user->id]) in every resource./users/{user}/posts/{post} out of the box.Users) to measure impact on DX before scaling."*How can I help you explore Laravel packages today?