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.
You can install this package via composer:
composer require spatie/laravel-resource-links
The package will automatically register a service provider.
Publishing the config file is optional:
php artisan vendor:publish --provider="Spatie\ResourceLinks\ResourceLinksServiceProvider" --tag="config"
This is the default content of the config file:
return [
/*
|--------------------------------------------------------------------------
| Serializer
|--------------------------------------------------------------------------
|
| The serializer will be used for the conversion of links to their array
| representation, when no serializer is explicitly defined for an link
| resource this serializer will be used.
|
*/
'serializer' => Spatie\ResourceLinks\Serializers\LinkSerializer::class,
];
How can I help you explore Laravel packages today?