$baseQuery = $entity->referencesTo()
->where('from_type', '=', (new Page())->getMorphClass())
->with([
- 'from' => fn(Relation $query) => $query->select(Page::$listAttributes),
- 'from.book' => fn(Relation $query) => $query->scopes('visible'),
- 'from.chapter' => fn(Relation $query) => $query->scopes('visible')
+ 'from' => fn (Relation $query) => $query->select(Page::$listAttributes),
+ 'from.book' => fn (Relation $query) => $query->scopes('visible'),
+ 'from.chapter' => fn (Relation $query) => $query->scopes('visible'),
]);
$references = $this->permissions->restrictEntityRelationQuery(
return $count;
}
-}
\ No newline at end of file
+}