This commit is contained in:
Marcel Pociot
2020-04-16 15:30:53 +02:00
parent e49708b290
commit 2778d5a489
22 changed files with 960 additions and 206 deletions

View File

@@ -2,6 +2,7 @@
namespace App\HttpServer\Controllers;
use App\Client\Client;
use GuzzleHttp\Psr7\Response;
use function GuzzleHttp\Psr7\str;
use Psr\Http\Message\RequestInterface;
@@ -15,10 +16,19 @@ class DashboardController extends Controller
str(new Response(
200,
['Content-Type' => 'text/html'],
file_get_contents(base_path('resources/views/index.html'))
$this->getView()
))
);
$connection->close();
}
protected function getView(): string
{
$view = file_get_contents(base_path('resources/views/index.html'));
$view = str_replace('%subdomains%', implode(' ', Client::$subdomains), $view);
return $view;
}
}