Download the PHP package netcreaties/laravel-synchronize without Composer
On this page you can find all versions of the php package netcreaties/laravel-synchronize. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download netcreaties/laravel-synchronize
More information about netcreaties/laravel-synchronize
Files in netcreaties/laravel-synchronize
Package laravel-synchronize
Short Description Laravel Synchronizations will enable you to create one time synchronizations and prevent creating commands you only use once
License MIT
Informations about the package laravel-synchronize
Laravel Synchronize
This package gives you the ability to create synchronization files and prevent you from having to write one time use commands when you've got for example: A database structure change that will require you to synchronize the old structure data with the new structure.
Documentation
- Laravel Synchronize
- Documentation
- Installation
- Laravel 5.5+
- Execute migrations
- Getting started
- Publish config
- Publish migration
- Execute migrations
- Usage
- Make command
- Synchronize command
Installation
The best way to install this package is through your terminal via Composer.
Run the following command from your projects root
Laravel 5.5+
This package supports package discovery.
Execute migrations
Getting started
Publish config (optional)
Publishing the config will enable you to overwrite some of the settings this package uses. For example you can define where synchronization files should be stored.
Publish migration
Execute migrations
Usage
Laravel Synchronize executes synchronizations that have the same class name as the migration class name, but with a Synchronization suffix, when executing migrations. This is the advised usage to ensure database integrity, but it is possible to execute synchronizations on their own (see section Synchronize command).
Make command
Creates the synchronization file at database/synchronizations
Synchronize command
Using --class and --force
It can happen you need a synchronization before you can perform a migration. Using --class and --force can help you achieving that goal.
All you need to do is using the Laravel 5.8.16+ Migration events.
Example:
--force
--force will execute the synchronization even when it already has been run. Use with caution.