I have a small project and I am using symfony 4.1 with Webpack encore. I am trying to include a CSS file but it does not load. Opening network tab in Opera (dev tools), I can see a 404 error when loading. I have placed the "assets" inside a newly created "web" folder, as it seems that it is the only place where "asset" function recognizes them. I am out of ideas.
My twig template looks like this:
{% block title %} Ads {% endblock %}
{% block body %}
<head>
<link rel="stylesheet" type="text/css" href="{{ asset('css/main.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/util.css') }}">
</head>
<div class="limiter">
<div class="container-table100">
<div class="wrap-table100">
<div class="table100">
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">ID</th>
<th scope="col">Title</th>
<th scope="col">Description</th>
<th scope="col">Price</th>
<th scope="col">Category</th>
<th scope="col">Start</th>
<th scope="col">End</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for ad in ads %}
<tr>
<th scope="row">{{ ad.id }}</th>
<td> <a href="{{ path('ad',{'id':ad.id}) }}">{{ ad.title }}</a></td>
<td>{{ ad.description }}</td>
<td>{{ ad.price }}</td>
<td>{{ ad.category.name}}</td>
<td>{{ ad.startDate|date('d:m:Y') }}</td>
<td>{{ ad.expiryDate|date('d:m:Y') }}</td>
<td><a class="btn btn-primary btn" href="{{ path('edit_ad',{'id':ad.id}) }}" role="button"> Edit</a></td>
<td> <form action="{{ path('delete_ad',{'id':ad.id}) }}" method="post"> <button type="submit" class="btn btn-default">Delete</button> </form> </td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
The tow files I want to include are: main.css and util.css (I do not own those two). I am a rookie when it comes to front-end, just started.