Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Endpoint Resources Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API Consistency & Developer Experience: Standardize API response structures by embedding actionable links (e.g., self, related, collection) in every resource, reducing manual URL construction and improving DX for frontend teams.
  • Roadmap for API-First Development: Align with a strategy to build a self-documenting API (e.g., for internal tools, mobile apps, or third-party integrations) by leveraging HATEOAS principles without over-engineering.
  • Build vs. Buy: Buy for small-to-medium APIs where maintaining custom link logic would add technical debt. Build only if needing highly customized link behavior (e.g., dynamic route parameters, non-standard actions).
  • Use Cases:
    • Internal admin dashboards consuming their own API.
    • Mobile apps needing pre-defined navigation paths.
    • Partner ecosystems requiring standardized API responses.
    • Legacy APIs where retrofitting links would be costly.

When to Consider This Package

Adopt if:

  • Your API uses Laravel’s resource controllers (e.g., index, show, store, update, destroy).
  • You prioritize developer velocity over fine-grained control of link generation.
  • Your API responses lack consistent navigation links, leading to frontend duplication or errors.
  • You’re okay with basic link types (e.g., self, related, collection) and don’t need dynamic or complex routes.

Look elsewhere if:

  • Your API uses non-standard routes (e.g., API Platform, custom route models, or dynamic segments like /users/{user}/posts/{post}).
  • You need HATEOAS compliance with advanced features (e.g., conditional links, templated URIs, or OAuth-scoped endpoints). Consider api-platform/core or spatie/laravel-hateoas (if maintained).
  • Your team requires real-time link validation or A/B tested endpoint paths (e.g., for feature flags).
  • You’re using Laravel 9+ and need modern alternatives (this package is archived and lacks Laravel 9 support). Evaluate:

How to Pitch It (Stakeholders)

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:

  • Consistent links: Every resource includes self, collection, and action-specific links (e.g., edit, delete).
  • Reduced boilerplate: No more route('posts.index', ['user' => $user->id]) in every resource.
  • API self-documentation: Frontend teams get clear paths without API specs. Tradeoffs:
  • Limited to standard routes: Won’t handle dynamic segments like /users/{user}/posts/{post} out of the box.
  • Archived: Last update in 2021 (but stable for Laravel 7/8). If using Laravel 9+, we’ll need a custom fork or alternative. Recommendation: Pilot this for one API module (e.g., Users) to measure impact on DX before scaling."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport