src/Controller/DashboardController.php line 19
<?phpnamespace App\Controller;use App\Repository\OptionRepository;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;class DashboardController extends AbstractController{public function __construct(private readonly OptionRepository $optionRepository){}#[Route('/', name: 'app_dashboard')]public function index(): Response{if (!$this->getUser()) {return $this->redirectToRoute('app_login');}$option = $this->optionRepository->findOneBy(['name' => 'ftp_ip']);$server_info['ftp_ip'] = is_null($option) ? 'Not set' : $option->getValue();$option = $this->optionRepository->findOneBy(['name' => 'ftp_port']);$server_info['ftp_port'] = is_null($option) ? 'Not set' : $option->getValue();;return $this->render('dashboard/dashboard.html.twig', array(// 'base_dir' => realpath( $this->container->getParameter( 'kernel.root_dir' ) . '/..' ) . DIRECTORY_SEPARATOR,'page_info' => ['page_name' => 'Dashboard'],'user' => $this->getUser(),'server_info' => $server_info,));}}