use BookStack\Uploads\Attachment;
-class Page extends Entity
+class Page extends BookChild
{
protected $fillable = ['name', 'html', 'priority', 'markdown'];
return $array;
}
- /**
- * Get the book this page sits in.
- * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
- */
- public function book()
- {
- return $this->belongsTo(Book::class);
- }
-
/**
* Get the parent item
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
$idComponent = $this->draft ? $this->id : urlencode($this->slug);
if ($path !== false) {
- return baseUrl('/books/' . urlencode($bookSlug) . $midText . $idComponent . '/' . trim($path, '/'));
+ return url('/books/' . urlencode($bookSlug) . $midText . $idComponent . '/' . trim($path, '/'));
}
- return baseUrl('/books/' . urlencode($bookSlug) . $midText . $idComponent);
+ return url('/books/' . urlencode($bookSlug) . $midText . $idComponent);
}
/**