Money and Remote services
This commit is contained in:
19
app/Service/Remote.php
Normal file
19
app/Service/Remote.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace App\Service;
|
||||
|
||||
use PDO;
|
||||
use App\Alias\RemoteConnection;
|
||||
|
||||
class Remote
|
||||
{
|
||||
public function __construct(protected RemoteConnection $connection) {}
|
||||
|
||||
public function getIP(): string
|
||||
{
|
||||
$query = "SELECT `ip` FROM `remote_ip` WHERE `host` = 'vialdelamaza'";
|
||||
$connection = $this->connection->connect();
|
||||
$statement = $connection->query($query);
|
||||
$result = $statement->fetch(PDO::FETCH_ASSOC);
|
||||
return $result['ip'];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user