mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
27 lines
494 B
PHP
27 lines
494 B
PHP
<?php
|
|
|
|
namespace BookStack;
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Images;
|
|
|
|
class Image extends Model
|
|
{
|
|
use Ownable;
|
|
|
|
protected $fillable = ['name'];
|
|
|
|
/**
|
|
* Get a thumbnail for this image.
|
|
* @param int $width
|
|
* @param int $height
|
|
* @param bool|false $hardCrop
|
|
* @return string
|
|
*/
|
|
public function getThumb($width, $height, $hardCrop = false)
|
|
{
|
|
return Images::getThumbnail($this, $width, $height, $hardCrop);
|
|
}
|
|
}
|