i create a controller pageController.php :
<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
class pageController {
public function index()
{
return new Response('<html><body>hello...</body></html>');
}
public function contactAction()
{
return new Response('<html><body>contact...</body></html>');
}
}
and here is the routes.yml
index:
path: /
controller: App\Controller\pageController::index
contact:
path: /contact
controller: App\Controller\pageController::contactAction
the index works fine, but the contact doesn't work!
Note: when I changed the path of index from "/" to "/index", it doesn't work anymore, it shows 404 not found
I don't want to use annotations until i want to fix this