Download the PHP package marceli-to/laravel-sync without Composer
On this page you can find all versions of the php package marceli-to/laravel-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marceli-to/laravel-sync
More information about marceli-to/laravel-sync
Files in marceli-to/laravel-sync
Package laravel-sync
Short Description Sync the production database and storage assets from remote Laravel environments to local.
License MIT
Informations about the package laravel-sync
Laravel Sync
Pull the production database and storage assets from a remote Laravel environment to your local setup — no FTP, no SSH, just one artisan command.
How It Works
- The package exposes protected endpoints on your remote site.
sync:pulldownloads a gzippedmysqldumpof the remote database and imports it into your local database.- For assets, it compares local and remote files via hash manifests and streams only new, changed, and deleted files as compressed
tar.gzarchives.
First run downloads everything. Subsequent asset runs only sync the diff.
Requirements
- PHP 8.1+
- Laravel 10, 11, 12, or 13
- MySQL / MariaDB
mysqldump,mysql,gzip/gunzip, andtaravailable on the relevant machines (standard on Linux/macOS)
Installation
Install the package on both your local and remote environments:
Configuration
Publish the config (optional — defaults work out of the box):
Environment Variables
Both environments (local + remote):
Generate a secure token:
Local environment only:
Usage
Pull everything (database + assets)
Pull only the database
Pull only assets
Dry run (see what would change)
Force full asset sync (skip delta comparison)
Skip confirmation prompts
Safety
Importing the remote database overwrites your local database. To protect against accidents:
- The command refuses to run if the local
APP_ENVisproduction. - It asks for confirmation before importing (skip with
--force). - Database credentials are passed via a temporary
--defaults-extra-file, so they never appear in the process list.
Configuration Options
Updating
Remember to update on both local and remote when upgrading.
Security
- All requests require a valid bearer token (compared in constant time).
- The
/_sync/databaseendpoint can stream your entire database — use a strong, unique token and consider the IP whitelist. - Optional IP whitelisting for additional protection.
- Directory traversal protection on asset file serving.
License
MIT
All versions of laravel-sync with dependencies
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
spatie/db-dumper Version ^3.5