Execute commands remotely using SSH.
Require this package in your composer.json and update your dependencies:
$ composer require tanjemark/laravel-remote
Since this package supports Laravel's Package Auto-Discovery you don't need to manually register the ServiceProvider.
After that, publish the configuration file:
$ php artisan vendor:publish --provider="Tanjemark\LaravelRemote\RemoteServiceProvider"
You're gonna need to add a remote server to the configuration file.
$ php artisan remote:artisan '@alias' 'command'
# Example
$ php artisan remote:artisan @live migrate
If you have provided a fake
setting in config/remote.php
the provided columns will be faked. Making it possible to make your sync GDPR approved 😁
$ php artisan remote:db-sync '@from_alias' '@to_alias'
# Example
$ php artisan remote:db-sync @live @local --fake
ssh2 have to be installed on all your servers.
$ sudo apt-get install php7.2-ssh2
The MIT License (MIT). Please see License File for more information.