*
* @throws Exception
*/
- protected function destroyEntity(Entity $entity): int
+ public function destroyEntity(Entity $entity): int
{
if ($entity instanceof Page) {
return $this->destroyPage($entity);
$entity->searchTerms()->delete();
$entity->deletions()->delete();
$entity->favourites()->delete();
+ $entity->referencesTo()->delete();
+ $entity->referencesFrom()->delete();
if ($entity instanceof HasCoverImage && $entity->cover()->exists()) {
$imageService = app()->make(ImageService::class);