X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/52033f3a6f0761309b000da05bbb3f6289e48409..refs/pull/692/head:/app/Image.php diff --git a/app/Image.php b/app/Image.php index 9d2835dc3..ad23a077a 100644 --- a/app/Image.php +++ b/app/Image.php @@ -1,23 +1,21 @@ -url; - } - public function createdBy() - { - return $this->belongsTo('Oxbow\User', 'created_by'); - } + protected $fillable = ['name']; - public function updatedBy() + /** + * Get a thumbnail for this image. + * @param int $width + * @param int $height + * @param bool|false $keepRatio + * @return string + */ + public function getThumb($width, $height, $keepRatio = false) { - return $this->belongsTo('Oxbow\User', 'updated_by'); + return Images::getThumbnail($this, $width, $height, $keepRatio); } }