I'm using symfony 4.4. I have a controller who have differents routes...
One of them have a token on arguments like this :
/**
* @Route("/activation/{token}", name="activation")
*/
public function activation(...
For this route and only this one, my css dosn't load because the path is wrong:
GET http://127.0.0.1:8000/activation/css/style.css net::ERR_ABORTED 404 (Not Found)
When i remove then{token} argument from my route my css loaded.
For my template i declare css like this on my base.html.twig:
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css')}}" />#}
Anyone have any idea why asset function render dynamique path ?
/css/style.css
or/css/activation.css
, because the current path is conflicting with your controller route. – Leprechaun