1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Reverted work on revisions

Improved linkage of drawings and image manager.
Updated image updates to create new versions.
This commit is contained in:
Dan Brown
2018-05-20 16:40:30 +01:00
parent 6cdb943916
commit 0c9c1e4c6b
10 changed files with 33 additions and 277 deletions

View File

@ -20,23 +20,4 @@ class Image extends Ownable
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);
}
/**
* Get the count of revisions made to this image.
* Based off numbers on revisions rather than raw count of attached revisions
* as they may be cleared up or revisions deleted at some point.
* @return int
*/
public function revisionCount()
{
return intval($this->revisions()->max('revision'));
}
}