Installation
npm i adonis-lucid-update-or-create --save
Registering provider
Make sure to register the update or create provider inside start/app.js
const providers = "adonis-lucid-update-or-create/providers/UpdateOrCreateProvider"
Usage
First add the trait to the model.
const Model = static { super this }
Finally use the method as follows
const Rating = Rating