2017 © Pedro Peláez
 

package laravel-entity-sync

Syncs entities from one project to another

image

ventrec/laravel-entity-sync

Syncs entities from one project to another

  • Sunday, October 29, 2017
  • by ventrec
  • Repository
  • 1 Watchers
  • 1 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 6 % Grown

The README.md

Laravel entity sync

Latest Version on Packagist Software License Build Status Total Downloads, (*1)

Easily sync entities, when changes occur, to another project., (*2)

Introduction

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., (*3)

For this to work, you will need to install the client package in the laravel project that you wish to sync your entities to., (*4)

Installation

  1. composer require ventrec/laravel-entity-sync
  2. Add Ventrec\LaravelEntitySync\LaravelEntitySyncProvider::class to providers in app.php
  3. Publish the config file php artisan vendor:publish --provider="Ventrec\LaravelEntitySync\LaravelEntitySyncProvider"
  4. Update the config file
    • Add the entities that you would like to monitor for changes to the config file.
    • Enter the full url to the endpoint where the requests should go.
    • Enter an api token that should be used to verify the requests

Usage

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., (*5)

Example, (*6)

In a User model you might want to exclude the password:, (*7)

public function ignoreSyncAttributes()
{
    return ['password'];
}

Prevent observer from running while seeding

In order to prevent the observer from running while seeding, you have to disable the package in runtime., (*8)

In your DatabaseSeeder class, add the following line at the top of the run() method:, (*9)

config(['laravelEntitySync.enabled' => false]);

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

29/10 2017

dev-master

9999999-dev

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

The Development Requires

by Runar Jørgensen

29/10 2017

1.0.0

1.0.0.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

The Development Requires

by Runar Jørgensen

18/10 2017

0.1.7

0.1.7.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

18/10 2017

0.1.6

0.1.6.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

17/10 2017

0.1.5

0.1.5.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

17/10 2017

0.1.4

0.1.4.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

17/10 2017

0.1.3

0.1.3.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

17/10 2017

0.1.2

0.1.2.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

16/10 2017

0.1.1

0.1.1.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen

15/10 2017

0.1.0

0.1.0.0

Syncs entities from one project to another

  Sources   Download

MIT

The Requires

 

by Runar Jørgensen