What Are SSH Commands In Laravel?

Executing Commands

` SSH::run(array $commands);
SSH::into($remote)->run(array $commands); 
// specify remote, otherwise assumes default
SSH::run(array $commands, function($line)
{
    echo $line.PHP_EOL;
});`

SFTP Uploads

array $commands); 
// define

SSH::task($taskName, function($line) 
// execute
 {
    echo $line.PHP_EOL;
});

SFTP Uploads

SSH::put($localFile, $remotePath);
SSH::putString($string, $remotePath);

Filesystem/Cloud Storage
Storage::disk('s3');
Storage::disk('local')->put('file.txt', 'Contents');
Storage::disk('local')->get('file.jpg');
Storage::disk('s3')->exists('file.jpg');
Storage::get('file.jpg');
Storage::put('file.jpg', $contents);
Storage::size('file1.jpg');
Storage::lastModified('file1.jpg');
Storage::copy('old/file1.jpg', 'new/file1.jpg');
Storage::move('old/file1.jpg', 'new/file1.jpg');
Storage::prepend('file.log', 'Prepended Text');
Storage::append('file.log', 'Appended Text');
Storage::delete(['file1.jpg', 'file2.jpg']);
Storage::files($directory);
Storage::allFiles($directory);
Storage::directories($directory);
Storage::allDirectories($directory);
Storage::makeDirectory($directory);
Storage::deleteDirectory($directory);        

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *