I'm new with Symfony (using version 3.4). And I'm using it with XAMPP on macOS High Sierra. I set my vhosts like this:
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/project/web/app_dev.php"
ServerName project
</VirtualHost>
And set my hosts file with "127.0.0.1 project" and that works fine.
But then in my application I created a Controller:
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class ProjectController extends Controller
{
/**
* @Route("/todo", name="todo_list")
*/
public function indexAction(Request $request)
{
die("TO DOS");
// replace this example code with whatever you need
return $this->render('default/index.html.twig', [
'base_dir' => realpath($this-
>getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
]);
}
}
but when I access to project/todo it redirects to project/dashboard and shows XAMPP welcome page. How can I go to project/todo ?
NOTE: Although I'm using Mac I'm doing this tutorial https://www.youtube.com/watch?v=HchMW8EhWPU