Installed twig with composer require twig command.
This commit is contained in:
1 parent
718855aaf6
commit
cd62d1c0f7
6 files changed
+456
-4
No files matched your search
@@ -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