ventrec/laravel-entity-sync is a Laravel package for syncs entities from one project to another.
It currently has 1 GitHub stars and 42 downloads on Packagist (latest version 1.0.0).
Install it with composer require ventrec/laravel-entity-sync.
Discover more Laravel packages by ventrec
or browse all Laravel packages to compare alternatives.
Last updated
Easily sync entities, when changes occur, to another project.
This package is designed to sync entities from one laravel project to another, something that can be useful if you have a master and client setup.
For this to work, you will need to install the client package in the laravel project that you wish to sync your entities to.
composer require ventrec/laravel-entity-syncVentrec\LaravelEntitySync\LaravelEntitySyncProvider::class to providers in app.phpphp artisan vendor:publish --provider="Ventrec\LaravelEntitySync\LaravelEntitySyncProvider"In some cases you might have attributes on a model that you do not want to sync. For this you can define a method named ignoreSyncAttributes that returns an array containing the name of attributes you do not want to sync.
Example
In a User model you might want to exclude the password:
public function ignoreSyncAttributes()
{
return ['password'];
}
In order to prevent the observer from running while seeding, you have to disable the package in runtime.
In your DatabaseSeeder class, add the following line at the top of the run() method:
config(['laravelEntitySync.enabled' => false]);
The MIT License (MIT). Please see License File for more information.