I'm trying to connect remotely with the api but I can not connect.
These are the connection data
It's in Laravel.
Code: Select all
protected function connection()
{
if (Auth::check())
{
$id = Auth::user()->id;
$mikrotik = Mikrotik::where('user_id', $id)
->first();
try {
$this->client = new RouterOS\Client($mikrotik->ipaddress, $mikrotik->user, $mikrotik->pass,$mikrotik->port);
} catch (\Exception $e) {
print "Error connecting to RouterOS";
}
}else{
echo 'no logeed';
}
}
Excuse my English, I am the translator.