deaniliev/remote

Laravel 框架的 LaravelCollective's Remote SSH 访问的分支。

v6.2.0 2020-09-07 20:21 UTC

README

有关 Laravel 框架的远程 (SSH) 的官方文档可以在 LaravelCollective 网站找到。

此仓库是 LaravelCollective's Remote 的分支。

添加了对 Laravel 9 的支持以及安装说明。

安装

composer.json

 "require": {
    ...
    "deaniliev/remote": "^6"
 },

config/app.php

'providers' => [

  Collective\Remote\RemoteServiceProvider::class,
]

'aliases' => Facade::defaultAliases()->merge([
        // 'ExampleClass' => App\Example\ExampleClass::class,
        'SSH' => \Collective\Remote\RemoteFacade::class,
])->toArray(),

composer update
php artisan vendor:publish

使用方法

在 confg/remote.php 中定义了连接后,您可以直接使用 SSH 类

SSH::run(['echo "This is a test"']);