brainstud/laravel-patchable-api-resource
Laravel Patchable API Resource
laravel-patchable-api-resource is a faster way to register patchable API resources in your routes file.
By registering a route as patchable-api-resource it differentiates between PUT and PATCH and calls the update() or patch() method on your controller.
Installation
Require the package
composer require brainstud/laravel-patchable-api-resource
Add the following to bootstrap/app.php:
$app->singleton(
'router',
\Brainstud\PatchableApiResource\PatchableApiResourceRouter::class
);
Usage
Registering a patchable API-resource works the same as the default Route::apiResource and Route::apiResources methods.
// api.php
Route::patchableApiResources([
'items' => ItemsController::class,
]);
Route::patchableApiResource('items', ItemController::class);
License
laravel-patchable-api-resource is open-sourced software licensed under the MIT License
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v2.0.0 | ^8.5 | ^12.0|| | MIT | |
| v1.0.12 | ^8.2 | ^10| | MIT | |
| v1.0.11 | ^8.2 | ^6| | MIT | |
| v1.0.10 | ^8.1 | ^6| | MIT | |
| v1.0.9 | ^8.0 || | ^6| | MIT | |
| v1.0.8 | ^8.0 || | ^6| | MIT | |
| v1.0.7 | ^8.0 || | ^6| | MIT | |
| v1.0.6 | ^8.0 | ^6| | MIT | |
| v1.0.4 | ^8.0 | ^6| | MIT | |
| v1.0.3 | ^8.0 | ^6| | MIT | |
| v1.0.1 | ^8.0 | ^6| | MIT |