0
I installed Symfony 5 using the command $ composer create-project symfony/website-skeleton my_project_name
with the intention of obtaining the most complete possible package from Symfony.
After configuring my Controller and routes, I started coding the Twig template using Bootstrap 4 via CND and the page rendering worked normally.
When I decided to configure the Bootstrap files in my location and no longer via CDN, I realized that the function asset()
did not return the path of files stored in "public folder".
The same occurs with other files and directories located within the "public folder".
I checked my "Composer.json" file and Asset is configured in the following version: "symfony/asset": "5.1.*"
. The same is correctly installed in the folder "vendor".
Here is an example of using the function in my code in the file "base.html.Twig":
href="{{ asset("bootstrap/css/bootstrap.css") }}
I retraced the installation steps of the "Asset" component following the instructions of the documentation below and also did not obtain result:
https://symfony.com/doc/current/components/asset.html
I would like to know if anyone has been through it and if they have any solution to it.
Grateful.