I'm new to Symfony, but I believe I understand how routes and controllers work. I've played with the tutorials on their website and everything was going great. However, I am not able to do some (supposedly) very simple things and I can't find anything useful when googling. To be honest, I'm not even sure I'm using the proper terminology, which makes looking online difficult. Here's what I would like to do:
- Use routes to point to files with HTML and display them. As I understand it, these files will be inside the public directory. What's the proper way to point to them from my controller class (see below).
e.g.:
class PageController
{
/**
* @Route("/")
*/
public function homepage()
{
return new Response('location of home.php');
}
}
- Similarly, link to CSS and JS from within the HTML. That includes working with CSS frameworks such as Bulma - which is installed in node_modules, outside the public directory. How do I manage that?
In a project without Symfony, my links on the document head look like this:
href="img/favicon.png" href="node_modules/bulma/css/bulma.css" href="css/style.css"
How do I manage those now?
How do I apply what I already know about designing websites to Symfony?