Skip to content
Discussion options

You must be logged in to vote

You can do this all in one call using the update method on the query.

await Item.query().where('name', 'test').update({ deletedAt: DateTime.now() })

https://docs.adonisjs.com/guides/models/crud-operations#update

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@3adel-bassiony
Comment options

@tomgobich
Comment options

Answer selected by 3adel-bassiony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants