tanjemark / laravel-remote
使用SSH远程执行命令。
1.0.7
2018-10-19 20:41 UTC
Requires
- php: >=7.0.0
- fzaninotto/faker: ^1.4
- illuminate/support: ^5.5
This package is not auto-updated.
Last update: 2024-09-29 06:31:04 UTC
README
使用SSH远程执行命令。
安装
在您的 composer.json 中添加此包并更新依赖项
$ composer require tanjemark/laravel-remote
由于此包支持Laravel的包自动发现,您无需手动注册ServiceProvider。
之后,发布配置文件
$ php artisan vendor:publish --provider="Tanjemark\LaravelRemote\RemoteServiceProvider"
您需要将远程服务器添加到配置文件中。
用法
Artisan
$ php artisan remote:artisan '@alias' 'command'
# Example
$ php artisan remote:artisan @live migrate
数据库同步
如果您在 config/remote.php 中提供了 fake
设置,提供的列将被模拟。这使得您的同步可以通过GDPR😁
$ php artisan remote:db-sync '@from_alias' '@to_alias'
# Example
$ php artisan remote:db-sync @live @local --fake
要求
ssh2必须在所有服务器上安装。
$ sudo apt-get install php7.2-ssh2
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。