Download the PHP package latevaweb/laravel-query-updater without Composer
On this page you can find all versions of the php package latevaweb/laravel-query-updater. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download latevaweb/laravel-query-updater
More information about latevaweb/laravel-query-updater
Files in latevaweb/laravel-query-updater
Package laravel-query-updater
Short Description Easily update Eloquent models from put API requests without losing data
License MIT
Homepage https://github.com/latevaweb/laravel-query-updater
Informations about the package laravel-query-updater
Build Eloquent update queries from put API requests
This package allows you to update fields and relations based on a request without losing data not send.
Installation
This package can be used in Laravel 6.0 or higher.
You can install the package via composer:
composer require latevaweb/laravel-query-updater
The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:
Basic usage
Update model field based on a put
or patch
request: /users
params: ['name' => 'Marc']
:
Update model field but keep stored value if parameter is empty or null
Extending filters
IF you have an special requirement that not fits with our filters KeepStored
or SimpleFilter
,
you can create your own extending LaTevaWeb\QueryUpdater\Filter\AbstractFilter
class.
Run tests
sqlite is required. Install it on ubuntu using sudo apt-get install php7.4-sqlite3
.
execute vendor/bin/phpunit
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-query-updater with dependencies
illuminate/http Version ^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0