I have two separate controller, view, database combos: Users and Jobs. Users contains: id, name, jobid. Jobs contains: id, name, wage.
In my user container, I want to retrieve my job name and wage to send to the user view. I wanted to know what is the best practices here. I have tried two methods:
1.) $this->requestAction('/Jobs/getArray', array('pass' => user['jobid'])); I heard this is not the best practice, especially if you have a lot of interaction between controllers, which I probably will. It is also a pain to try and do all of the sending and receiving this way.
2.) App::import the jobs Connector. $Jobs = new JobsConnector. $Jobs->getArray($user['jobid']); Any time I try to do this, I get undefined errors. JobConnector::Job does not exist. I then get an error on the find() method, which otherwise is working.
I have spent hours trying to work out both methods and have been pulling my hair out. I am on the verge of going back to my own personal class interaction because of how much of a PitA these class interactions are.
Someone, please help!