1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Started work on drawing revisions

Improved sidebar and selection styling of image manager.
Allowed image manager imageType to be changed on open.
Created models for image revisions.
This commit is contained in:
Dan Brown
2018-05-13 12:07:38 +01:00
parent b0d027a4a9
commit d5b922aa50
25 changed files with 217 additions and 73 deletions

View File

@ -9,13 +9,23 @@ class Image extends Ownable
/**
* Get a thumbnail for this image.
* @param int $width
* @param int $height
* @param int $width
* @param int $height
* @param bool|false $keepRatio
* @return string
* @throws \Exception
*/
public function getThumb($width, $height, $keepRatio = false)
{
return Images::getThumbnail($this, $width, $height, $keepRatio);
}
/**
* Get the revisions for this image.
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function revisions()
{
return $this->hasMany(ImageRevision::class);
}
}