Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

andonis many to many detach

// Remove projects with id 1, 2, 3
await user.related('projects').detach([1, 2, 3])
// Remove all projects
await user.related('projects').detach()
Source by docs.adonisjs.com #
 
PREVIOUS NEXT
Tagged: #andonis #detach
ADD COMMENT
Topic
Name
6+9 =