]> BookStack Code Mirror - bookstack/blob - app/Image.php
Added custom user avatars
[bookstack] / app / Image.php
1 <?php
2
3 namespace BookStack;
4
5
6 use Illuminate\Database\Eloquent\Model;
7 use Images;
8
9 class Image extends Model
10 {
11     use Ownable;
12
13     protected $fillable = ['name'];
14
15     /**
16      * Get a thumbnail for this image.
17      * @param  int       $width
18      * @param  int       $height
19      * @param bool|false $hardCrop
20      * @return string
21      */
22     public function getThumb($width, $height, $hardCrop = false)
23     {
24         return Images::getThumbnail($this, $width, $height, $hardCrop);
25     }
26 }