Closed mabasic closed 7 years ago
I have defined a task:
Route::get('/task', function() { \SSH::into('myserver')->define('list', [ 'cd /', 'ls -all' ]); \SSH::into('myserver')->task('list', function($line) { echo $line.PHP_EOL; }); });
When I visit /task in the browser it immediately shows an empty page, but when I run:
/task
Route::get('/output', function() { $commands = [ 'cd /', 'ls -all' ]; \SSH::run($commands, function($line) { echo $line.PHP_EOL; }); });
it works, so I know that the connection is successful.
Any help?
https://laravelcollective.com/docs/5.4/ssh#tasks
I have defined a task:
When I visit
/task
in the browser it immediately shows an empty page, but when I run:it works, so I know that the connection is successful.
Any help?