1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-14 19:42:14 +03:00
Files
bookstack/app/Entities/Models/BookChild.php
Dan Brown c90816987c Slugs: Rolled out history lookup to other types
Added testing to cover.
Also added batch recording of child slug pairs on book slug changes.
2025-11-24 19:49:34 +00:00

26 lines
495 B
PHP

<?php
namespace BookStack\Entities\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Class BookChild.
*
* @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();
}
}