V
V
Vladimir Kokhan2021-02-12 16:54:58
Laravel
Vladimir Kokhan, 2021-02-12 16:54:58

How to remove nested comments?

Good day everyone.
When you delete a parent comment, you need to delete its children and child children. That is, the nesting level is unknown and a recursive function is needed to remove it. And here with this complete plug. If anyone has an example of this, please share.
About onDelete('cascade') in the course, I would like to know how to solve this issue using recursion.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question