]> BookStack Code Mirror - bookstack/blob - app/Entities/Models/BookChild.php
Merge pull request #5917 from BookStackApp/copy_references
[bookstack] / app / Entities / Models / BookChild.php
1 <?php
2
3 namespace BookStack\Entities\Models;
4
5 use Illuminate\Database\Eloquent\Relations\BelongsTo;
6
7 /**
8  * Class BookChild.
9  *
10  * @property int    $book_id
11  * @property int    $priority
12  * @property string $book_slug
13  * @property Book   $book
14  */
15 abstract class BookChild extends Entity
16 {
17     /**
18      * Get the book this page sits in.
19      * @return BelongsTo<Book, $this>
20      */
21     public function book(): BelongsTo
22     {
23         return $this->belongsTo(Book::class)->withTrashed();
24     }
25 }