1

I have a form model with $hasMany relation manager in backend (display with relation_render method).

When i update the relation model, i update too a parent model attribute

public function afterUpdate() {
    // update related model
    $related_model = Related_model::find($this->related_model_id);
    $related_model->searchable = !$this->suspensive;
    $related_model->save();
}

Then i have to refresh the form model page after saving relation to prevent to ovveride modification if user click save.

No idea how to do this. thanks for help

subsidiary question: let me know if there a better workflow to accomplish this task

pat-och
  • 345
  • 3
  • 17

0 Answers0