Installed twig with composer require twig command.
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class MainController
|
||||
class MainController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'main')]
|
||||
public function homepage(): Response
|
||||
{
|
||||
return new Response('Hello World!');
|
||||
return $this->render('main/homepage.html.twig', ['variable' => random_int(0, 1e10)]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user