Handles incoming sync requests for the laravel entity sync package.
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.
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
All models that is used must have protected $guarded = []
.
The MIT License (MIT). Please see License File for more information.