brainstud/laravel-patchable-api-resource
最新稳定版本:v2.0.0
Composer 安装命令:
composer require brainstud/laravel-patchable-api-resource
包简介
A route generator that generates distinct put and patch endpoints
README 文档
README
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
统计信息
- 总下载量: 5.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-30