Good evening! I have 2 client and email tables , when saving the client I need to save the email next to the email table, however I need to call the "save" function of the email controller. how do I do? Thank you all
Good evening! I have 2 client and email tables , when saving the client I need to save the email next to the email table, however I need to call the "save" function of the email controller. how do I do? Thank you all
To use a model from another controller, you can do the following:
public function add() {
...
Controller::loadModel('EmailModel');
$this->EmailModel->save(...);
}