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 pass parameters in different ways to an link type. By value's:
$links
->controller(UsersController::class)
->parameters(User::first(), Post::first());
Or by array:
$links
->controller(UsersController::class)
->parameters([User::first(), Post::first()]);
You can even pass an associative array where the keys will be used for parameter deducing:
$links
->controller(UsersController::class)
->parameters(['user' => User::first(), 'post' => Post::first()]);
Lastly, parameters can be called as many times as you want:
$links
->controller(UsersController::class)
->parameters(User::first())
->parameters(Post::first());
How can I help you explore Laravel packages today?