Cli
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
<?php
|
||||
namespace App\Contract;
|
||||
|
||||
use App\Alias\RemoteConnection;
|
||||
use App\Definition\Contract;
|
||||
use App\Service\Money;
|
||||
use App\Service\Remote;
|
||||
use App\Service\View as ViewService;
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
class View
|
||||
{
|
||||
@ -10,7 +14,12 @@ class View
|
||||
|
||||
protected static function newInstance()
|
||||
{
|
||||
return new ViewService();
|
||||
$remote = new Remote(new RemoteConnection());
|
||||
$money = (new Money(new Client([
|
||||
'base_uri' => "http://{$remote->getIP()}:8008",
|
||||
'headers' => ['Accept' => 'application/json']
|
||||
])));
|
||||
return new ViewService(['money' => $money]);
|
||||
}
|
||||
public static function show($template, $variables = null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user