1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Added sidebar highlighting and fixed code elements. Fixes #18

This commit is contained in:
Dan Brown
2015-08-16 14:51:45 +01:00
parent ca2a3ba0e8
commit 521b3b8eb1
14 changed files with 93 additions and 73 deletions

View File

@ -1,8 +1,7 @@
<?php namespace Oxbow;
use Illuminate\Database\Eloquent\Model;
class Chapter extends Model
class Chapter extends Entity
{
protected $fillable = ['name', 'description', 'priority', 'book_id'];
@ -17,16 +16,6 @@ class Chapter extends Model
return $this->hasMany('Oxbow\Page')->orderBy('priority', 'ASC');
}
public function createdBy()
{
return $this->belongsTo('Oxbow\User', 'created_by');
}
public function updatedBy()
{
return $this->belongsTo('Oxbow\User', 'updated_by');
}
public function getUrl()
{
return '/books/' . $this->book->slug . '/chapter/' . $this->slug;