KangarooMusiQue
4 months ago
887
8
Laravel

If i try to delete table-rows with a skip it deletes all rows in the table :(

Posted 4 months ago by KangarooMusiQue

I try to delete everything from a table except the latest three rows.

So i did:

NextTitle::latest()->skip(3)->delete();

But it deletes the whole Table instead of leaving the latest three. What am i doing wrong? i want to delete everything from the table exept the last three entries.

Please sign in or create an account to participate in this conversation.