Controller must return a response in Symfony2

前端 未结 2 1438
轮回少年
轮回少年 2021-01-04 09:21

I have an ajax call in my code. What I want to achieve with the call works fine. I want to delete some records from the database which is actually deleted when the method is

2条回答
  •  -上瘾入骨i
    2021-01-04 09:33

    Replace return true; with return new Response();. Also don't forget to write use Symfony\Component\HttpFoundation\Response; at the top.

提交回复
热议问题