]> BookStack Code Mirror - bookstack/blob - app/ImageRevision.php
Started work on revisions in image manager
[bookstack] / app / ImageRevision.php
1 <?php
2
3 namespace BookStack;
4
5 use Illuminate\Database\Eloquent\Model;
6
7 class ImageRevision extends Model
8 {
9     /**
10      * Relation for the user that created this entity.
11      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
12      */
13     public function createdBy()
14     {
15         return $this->belongsTo(User::class, 'created_by');
16     }
17
18     /**
19      * Get the image that this is a revision of.
20      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
21      */
22     public function image()
23     {
24         return $this->belongsTo(Image::class);
25     }
26 }