PHP code example of paulo-hortelan / onmt

1. Go to this page and download the library: Download paulo-hortelan/onmt 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/ */

    

paulo-hortelan / onmt example snippets


use PauloHortelan\Onmt\Facades\ZTE;

$zte = ZTE::connectTelnet('10.0.0.10', 'username', 'password', 23);

$zte->interfaces(['1/1/1:1']);

$optical = $zte->ontsOpticalPower();
$detail = $zte->detailOntsInfo();

$zte->disconnect();

use PauloHortelan\Onmt\Facades\Fiberhome;

$fiberhome = Fiberhome::connectTL1('10.0.0.20', 'username', 'password', 3337, '10.0.0.20');

$fiberhome->serials(['ALCL12345678', 'CMSZ12345678']);
$result = $fiberhome->ontsOpticalPower('NA-NA-1-1');

$fiberhome->disconnect();

$zte->startRecordingCommands(
    description: 'Night maintenance - optical check',
    ponInterface: '1/1/1'
);

$zte->interfaces(['1/1/1:1'])->ontsOpticalPower();

$batch = $zte->stopRecordingCommands();
bash
php artisan vendor:publish --tag=onmt-config
php artisan vendor:publish --tag=onmt-migrations
php artisan migrate