]> BookStack Code Mirror - bookstack/blob - app/Page.php
Added page editing
[bookstack] / app / Page.php
1 <?php
2
3 namespace Oxbow;
4
5 use Illuminate\Database\Eloquent\Model;
6
7 class Page extends Model
8 {
9     protected $fillable = ['name', 'html', 'priority'];
10
11     public function book()
12     {
13         return $this->belongsTo('Oxbow\Book');
14     }
15
16     public function getUrl()
17     {
18         return '/books/' . $this->book->slug . '/' . $this->slug;
19     }
20 }