Skip to content

Instantly share code, notes, and snippets.

@diego3g
Last active June 27, 2018 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diego3g/79aa2408f63ac32bb3b1254f4dda5b0d to your computer and use it in GitHub Desktop.
Save diego3g/79aa2408f63ac32bb3b1254f4dda5b0d to your computer and use it in GitHub Desktop.
"use strict"
const User = use("App/Models/User")
class UserController {
async create ({ request }) {
const data = request.only(["username", "email", "password"])
const user = await User.create(data)
return user
}
}
module.exports = UserController
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment