Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created July 17, 2018 15:25
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/4476fa7801de9f9756c95f2a57e53b2e to your computer and use it in GitHub Desktop.
Save diego3g/4476fa7801de9f9756c95f2a57e53b2e to your computer and use it in GitHub Desktop.
'use strict'
const Env = use('Env')
const Model = use('Model')
class Image extends Model {
static get computed () {
return ['url']
}
getUrl ({ path }) {
return `${Env.get('APP_URL')}/images/${path}`
}
}
module.exports = Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment