PHPackages                             ldavidsp/laravel-sync - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ldavidsp/laravel-sync

ActiveLibrary[Database &amp; ORM](/categories/database)

ldavidsp/laravel-sync
=====================

Synchronize your local or stage database with the production one.

v2.0.1(2y ago)4282MITPHPPHP &gt;=7.2.5

Since Nov 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ldavidsp/laravel-sync)[ Packagist](https://packagist.org/packages/ldavidsp/laravel-sync)[ Docs](https://github.com/ldavidsp/laravel-sync)[ RSS](/packages/ldavidsp-laravel-sync/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (14)Used By (0)

Laravel Sync Database
=====================

[](#laravel-sync-database)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8a4b174f0a7c64b95e6c73e3c7755838d587d24bec24f801ac87deca8712a259/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c646176696473702f6c61726176656c2d73796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ldavidsp/laravel-sync)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/c27a7412b47bcf3f0eb905602e3f699d2e0758b2f3ca2484d155fa1814396410/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c646176696473702f6c61726176656c2d73796e632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ldavidsp/laravel-sync)

This package contains some useful Artisan commands to work the synchronization of the local database with the production one.

Requirements
------------

[](#requirements)

This package requires Laravel 6 or newer.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require ldavidsp/laravel-sync
```

Publish the config file with:

```
php artisan vendor:publish --tag=sync-config
```

Add tables to synchronize in `config/sync.php`:

```
  /*
    |--------------------------------------------------------------------------
    | Sync tables
    |--------------------------------------------------------------------------
    */
  'sync_tables' => [
    'table_name_1',
  ],
```

Add the configuration for the production database to `config/database.php`:

```
'live-db' => [
  'driver' => env('DB_LIVE_CONNECTION', 'mysql'),
  'host' => env('DB_LIVE_HOST', 'your live server database host here'),
  'port' => env('DB_LIVE_PORT', '3306'),
  'database' => env('DB_LIVE_DATABASE', 'forge'),
  'username' => env('DB_LIVE_USERNAME', 'forge'),
  'password' => env('DB_LIVE_PASSWORD', ''),
],
```

Add the configuration in `.env`:

```
DB_LIVE_CONNECTION=mysql
DB_LIVE_HOST=
DB_LIVE_PORT=3306
DB_LIVE_DATABASE=
DB_LIVE_USERNAME=
DB_LIVE_PASSWORD=
```

Usage
-----

[](#usage)

Synchronize database:

```
php artisan sync:prod
```

or

Add the configuration in `app/Console/Kernel.php`:

```
/**
  * Sync local database with production.
  */
  if (App::environment('local')) {
    $schedule->command('sync:prod')->everyTenMinutes();
  }
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Recently: every ~89 days

Total

12

Last Release

902d ago

Major Versions

v1.0.9 → v2.0.02023-11-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f3a8af21bab573564ef9d8c6653f4e8d5fe360b6ef629a750dc641b1351ea1a?d=identicon)[ldavidsp](/maintainers/ldavidsp)

---

Top Contributors

[![slzno](https://avatars.githubusercontent.com/u/44006503?v=4)](https://github.com/slzno "slzno (20 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (1 commits)")

---

Tags

phplaraveldbsynchomeflow

### Embed Badge

![Health badge](/badges/ldavidsp-laravel-sync/health.svg)

```
[![Health](https://phpackages.com/badges/ldavidsp-laravel-sync/health.svg)](https://phpackages.com/packages/ldavidsp-laravel-sync)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[awssat/laravel-sync-migration

Laravel tool helps to sync migrations without refreshing the database

10923.2k](/packages/awssat-laravel-sync-migration)[tomatophp/filament-translations

Manage your translation with DB and cache, you can scan your languages tags like trans(), \_\_(), and get the string inside and translate them use UI.

6230.1k3](/packages/tomatophp-filament-translations)[webparking/laravel-db-rebuild

A laravel package that allows for quick database rebuilds with presets.

448.8k](/packages/webparking-laravel-db-rebuild)[mwi/laravel-db-sync

Sync remote database to local

154.3k](/packages/mwi-laravel-db-sync)[salehhashemi/laravel-repository

Implementing the repository pattern for Laravel projects.

2010.5k](/packages/salehhashemi-laravel-repository)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
