public function save() { $success = parent::save(); if (isset($this->data['tags'])) { $this->locationRepository->tagsDestroy($this->entity->id); $this->locationRepository->tagsAttach($this->entity->id, $this->data['tags']); } }
public function save() { $success = parent::save(); if (isset($this->data['resources'])) { $this->roleRepository->resourceDestroy($this->entity->id); $this->roleRepository->resourcesAttach($this->entity->id, $this->data['resources']); } }