1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-13 07:42:23 +03:00
Files
bookstack/app/Entities/Models/BookChild.php
Dan Brown 291a807d98 Slugs: Added slug recording at points of generation
Also moved some model-level helpers, which used app container
resolution, to be injected services instead.
2025-11-23 23:29:30 +00:00

25 lines
457 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.
*/
public function book(): BelongsTo
{
return $this->belongsTo(Book::class)->withTrashed();
}
}