mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-28 13:12:05 +00:00
27 lines
457 B
PHP
27 lines
457 B
PHP
![]() |
<?php
|
||
|
|
||
|
namespace Oxbow;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
||
|
class PageRevision extends Model
|
||
|
{
|
||
|
protected $fillable = ['name', 'html', 'text'];
|
||
|
|
||
|
public function createdBy()
|
||
|
{
|
||
|
return $this->belongsTo('Oxbow\User', 'created_by');
|
||
|
}
|
||
|
|
||
|
public function page()
|
||
|
{
|
||
|
return $this->belongsTo('Oxbow\Page');
|
||
|
}
|
||
|
|
||
|
public function getUrl()
|
||
|
{
|
||
|
return $this->page->getUrl() . '/revisions/' . $this->id;
|
||
|
}
|
||
|
|
||
|
}
|