brainstud/laravel-patchable-api-resource

A route generator that generates distinct put and patch endpoints
6,070
Install
composer require brainstud/laravel-patchable-api-resource
Latest Version:v2.0.0
PHP:^8.5
License:MIT
Last Updated:Apr 16, 2026
Links: GitHub  ·  Packagist
Maintainer: Diondb

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

gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440