Download the PHP package slashequip/laravel-patchable without Composer
On this page you can find all versions of the php package slashequip/laravel-patchable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download slashequip/laravel-patchable
More information about slashequip/laravel-patchable
Files in slashequip/laravel-patchable
Package laravel-patchable
Short Description Laraval package to add a more declarative way to handle PATCH endpoints.
License MIT
Homepage https://github.com/slashequip/laravel-patcher
Informations about the package laravel-patchable
Laravel Patchable 🩹
Laravel Patchable is an opinionated, declarative package to help simplify the building of PATCH routes.
It abstracts the boiler plate needed to validate and update individual Model attributes based on the request.
Installation
You can install the package via composer:
Usage
Your Model's can be made patchable by add the trait of the same name.
In your patch controllers you can simply call patch on the Model.
To configure you model you need to define your patchable attributes.
To get a little more advanced you can define validation for your patchable attributes.
This can be achieved either with Laravel's string or array syntax for validation rules.
To get even more advanced you can use Patch classes for your patchable attributes.
If you want to handle patching with a more manual approach, you can use the Patcher class directly.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Sam Jones
- All Contributors
License
The MIT License (MIT). Please see License File for more information.