spatie/laravel-resource-endpoints
Abandoned package that adds controller-based “links” and collection “meta” links to Laravel API Resources. Automatically generates URLs for actions like index/show/edit/update/delete, so resources can expose REST endpoints without manually building routes.
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?