Deleting an item

To delete, it is as simple as finding an object and invoking the delete method on it:

let item = Item.find(1)try item.delete()

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.