33 lines
811 B
PHP
33 lines
811 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Services\SocialTreePageService;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\View\View;
|
|
|
|
class SocialTreePageController extends Controller
|
|
{
|
|
private $socialTreePageService;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->socialTreePageService = new SocialTreePageService();
|
|
}
|
|
|
|
public function index(): view
|
|
{
|
|
$links = $this->socialTreePageService->getLinks();
|
|
$config = $this->socialTreePageService->getConfig()[0];
|
|
$username = $config['username'];
|
|
$theme = $config['theme'];
|
|
return view('app',[
|
|
'title' => $username . 's LinkTree',
|
|
'username' => $username,
|
|
'links' => $links,
|
|
'theme' => $theme,
|
|
'content' => 'linkpage'
|
|
]);
|
|
}
|
|
}
|