Created
July 17, 2018 14:22
-
-
Save diego3g/584a9e2be809ba9dcefc896b5a2b9648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async store ({ auth, request, response }) { | |
const { id } = auth.user | |
const data = request.only([ | |
'title', | |
'address', | |
'latitude', | |
'longitude', | |
'price' | |
]) | |
const property = await Property.create({ ...data, user_id: id }) | |
return property | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment