mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-25 03:35:35 +00:00
![Dan Brown](/assets/img/avatar_default.png)
- Created BookChild class to share some page/chapter logic. - Gave entities the power to generate their own permissions and slugs. - Moved bits out of BaseController constructor since it was overly sticky. - Moved slug generation logic into its own class. - Created a facade for permissions due to high use. - Fixed failing test issues from last commits
21 lines
357 B
PHP
21 lines
357 B
PHP
<?php namespace BookStack\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* Class BookChild
|
|
* @property int $book_id
|
|
*/
|
|
class BookChild extends Entity
|
|
{
|
|
|
|
/**
|
|
* Get the book this page sits in.
|
|
* @return BelongsTo
|
|
*/
|
|
public function book(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Book::class);
|
|
}
|
|
|
|
} |