protected function createEntity(array $data) { $entity = new Page($data); $group = GroupSynker::select($this->groups(), $data['group']); if (!$group) { throw new \Exception('Failed to bind group: no matched group found: ' . $this->groupData['title']); } $entity->group()->associate($group); return $entity; }