Created
July 17, 2018 14:29
-
-
Save diego3g/81d69911296fc00af08c2524e2bf0df7 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 update ({ params, request, response }) { | |
const property = await Property.findOrFail(params.id) | |
const data = request.only([ | |
'title', | |
'address', | |
'latitude', | |
'longitude', | |
'price' | |
]) | |
property.merge(data) | |
await property.save() | |
return property | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment