PHP code example of wearesho-team / yii2-monitoring-fs
1. Go to this page and download the library: Download wearesho-team/yii2-monitoring-fs library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wearesho-team / yii2-monitoring-fs example snippets
use Wearesho\Yii\Monitoring;
class MonitoringController extends \yii\console\Controller
{
public function actionIndex()
{
/** @var \League\Flysystem\Filesystem $fs */
$control = new Monitoring\Control\Fs([
'fs' => $fs,
'client' => new \GuzzleHttp\Client(),
]);
try {
$details = $control->execute();
} catch (\Horat1us\Yii\Monitoring\Exception $exception) {
$this->stdout($exception->getMessage());
}
}
}