Files
BookStack/app/Entities/Models/BookChild.php

26 lines
495 B
PHP
Raw Normal View History

2021-06-26 15:23:15 +00:00
<?php
namespace BookStack\Entities\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
2021-06-26 15:23:15 +00:00
* Class BookChild.
*
2021-08-24 21:23:55 +01:00
* @property int $book_id
* @property int $priority
* @property string $book_slug
* @property Book $book
*/
abstract class BookChild extends Entity
{
/**
* Get the book this page sits in.
* @return BelongsTo<Book, $this>
*/
public function book(): BelongsTo
{
return $this->belongsTo(Book::class)->withTrashed();
}
}