Insertion rules between related models

#1

Suppose we a User hasMany() Post.
Are we allowed to do this:

await post.save() // In PostController.store
await user.save() // In UserController.store

Or should we necessarily insert this way:

await user.posts().save(post)

0 Likes