I have two separate controller, view, database combos: Users and Jobs. Users contains: id, name, jobid. Jobs contains: id, name, wage.
Benim kullanıcı kapta, ben kullanıcı görünümüne göndermek için benim işim isim ve ücret almak istiyor. Ben burada en iyi uygulamaları ne olduğunu bilmek istedim. Ben iki yöntemi denedim:
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.
Ben her iki yöntem bulmaya çalışıyorum saat geçirdim ve saçımı çekerek edilmiştir. Çünkü bu sınıf etkileşimler ne kadar bir pide geri benim kendi kişisel sınıf etkileşimi gitme üzereyim.
Birisi, yardım lütfen!