mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 21:45:55 +00:00
wip
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user