spatie/laravel-resource-links
Abandoned package that adds action URLs to Laravel API resources. Generate per-item and collection links (show/edit/update/delete, index/create/store) from a controller or defined actions, so resources include ready-to-use endpoints without manual URL building.
JsonResource classes.index, show) may not fit all architectures.url() helper or route() macro?
toArray().UserResource with posts relationship)?
/v1/users)?
JsonResource for responses.JsonResource classes to identify manual URL construction.UserResource) to validate behavior.route() calls for accuracy.JsonResource classes with HasLinks trait.users/{user}). Custom routes (e.g., users/{user}/profile) may require manual overrides.ResourceController for multiple models).JsonResource).composer require spatie/laravel-resource-links
config/resource-links.php.JsonResource classes:
use Spatie\ResourceLinks\HasLinks;
use Spatie\ResourceLinks\HasMeta;
route() calls in resources.composer.json, increasing vendor risk.JsonResource classes.route() calls may push back.PostResource").How can I help you explore Laravel packages today?