ventrec / laravel-entity-sync-endpoint
Endpoint that handles syncing of entities
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Type:package
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^3.5
- phpunit/phpunit: ^6.4
This package is not auto-updated.
Last update: 2024-11-10 05:46:08 UTC
README
Handles incoming sync requests for the laravel entity sync package.
Introduction
This is the client package of the laravel entity sync package. The laravel entity sync package syncs entities to the endpoints that this package creates. This package will then handle the data and create, update or delete the entity.
The structure of your tables should be the same on both the master database and the client database.
Installation
composer require ventrec/laravel-entity-sync-endpoint
- Add
Ventrec\LaravelEntitySyncClient\LaravelEntitySyncClientProvider::class
to providers in app.php - Publish the config file
php artisan vendor:publish --provider="Ventrec\LaravelEntitySyncClient\LaravelEntitySyncClientProvider"
- Update the config file
- Add the entities that you expect to receive requests for. This should be the same entities that you have entered in the master config.
- Enter an api token that should be used to verify the requests. This should be the same token that was used in the master config.
- (Optional) Enter a prefix for the api-endpoint. If no prefix is entered, all requests will be sent to
/entity-sync
Usage
All models that is used must have protected $guarded = []
.
License
The MIT License (MIT). Please see License File for more information.