mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-31 16:12:42 +01:00
24 lines
485 B
PHP
24 lines
485 B
PHP
<?php namespace BookStack\Uploads;
|
|
|
|
use BookStack\Ownable;
|
|
use Images;
|
|
|
|
class Image extends Ownable
|
|
{
|
|
|
|
protected $fillable = ['name'];
|
|
|
|
/**
|
|
* Get a thumbnail for this image.
|
|
* @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);
|
|
}
|
|
}
|