]> BookStack Code Mirror - bookstack/blob - app/Image.php
9d2835dc3e3763375aec36d5d7d32017e84909d4
[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     public function getFilePath()
10     {
11         return storage_path() . $this->url;
12     }
13
14     public function createdBy()
15     {
16         return $this->belongsTo('Oxbow\User', 'created_by');
17     }
18
19     public function updatedBy()
20     {
21         return $this->belongsTo('Oxbow\User', 'updated_by');
22     }
23 }