Why are '>>>>>' symbols appearing on my view even after deleting vendor and cache in a knp paginator setup?

47 Views Asked by At

Do you understand why I have these '>>>>>' displayed on my view? It doesn't correspond to anything, I can't find the problem with knp paginator. I already deleted the vendor, the cache. The '>>>' are adjusted according to the pagination parameters. ('page', 1), 10

Thanks for your help :)

knp paginator

 #[Route('/admin/annonce', name: 'admin_ads_index', methods: ['GET'])]
    public function index(
        AdsRepository $repository,
        PaginatorInterface $paginator,
        Request $request
    ): Response {
        $ads = $paginator->paginate(
            $repository->findAll(),
            $request->query->getInt('page', 1),
            10
        );
        return $this->render('admin/ads/index.html.twig', [
            'ads' => $ads,
        ]);
    }

Template :

{% extends 'base-admin.html.twig' %}
{% block title %}
    {{ parent() }}- Voir les annonces
{% endblock %}
{% block body %}
    <div class="card border-primary">
        <div class="card-header">LES ANNONCES</div>
        <div class="card-body">
            {% if not ads.items is same as ([]) %}
                <table class="table table-dark">
                    <thead>
                        <tr>
                            <th scope="col">Id</th>
                            <th scope="col">Auteur</th>
                            <th scope="col">Date</th>
                            <th scope="col">Titre</th>
                            <th scope="col">Descrition courte</th>
                            <th scope="col">Description longue</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for ad in ads %}
                            <tr class="table-primary">
                                <th scope="row">{{ad.id}}</th>
                                <td>{{ad.author}}</td>
                                <td>{{ad.createdAt|date("d/m/Y")}}</td>
                                <td>{{ad.title}}</td>>
                                <td>{{ad.shortDescription}}</td>
                                <td>{{ad.longDescription}}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
                <div class="navigation d-flex justify-content-center mt-4">
                    {{ knp_pagination_render(ads) }}
                </div>
            {% else %}
                <h4>Vous n'avez pas encore d'annonces</h4>
            {% endif %}
        </div>
    </div>
{% endblock %}

Trying delete vendor and cache

0

There are 0 best solutions below