]> BookStack Code Mirror - bookstack/blob - app/Image.php
Added image name editing & deleting
[bookstack] / app / Image.php
1 <?php
2
3 namespace Oxbow;
4
5 use Illuminate\Database\Eloquent\Model;
6
7 class Image extends Model
8 {
9
10     protected $fillable = ['name'];
11
12     public function getFilePath()
13     {
14         return storage_path() . $this->url;
15     }
16
17     public function createdBy()
18     {
19         return $this->belongsTo('Oxbow\User', 'created_by');
20     }
21
22     public function updatedBy()
23     {
24         return $this->belongsTo('Oxbow\User', 'updated_by');
25     }
26 }