]> BookStack Code Mirror - bookstack/blob - app/PageRevision.php
Found the source of the issue, not sure how to fix
[bookstack] / app / PageRevision.php
1 <?php
2
3 namespace BookStack;
4
5 use Illuminate\Database\Eloquent\Model;
6
7 class PageRevision extends Model
8 {
9     protected $fillable = ['name', 'html', 'text'];
10
11     public function createdBy()
12     {
13         return $this->belongsTo('BookStack\User', 'created_by');
14     }
15
16     public function page()
17     {
18         return $this->belongsTo('BookStack\Page');
19     }
20
21     public function getUrl()
22     {
23         return $this->page->getUrl() . '/revisions/' . $this->id;
24     }
25
26 }