I am new to MVC proramming (And even object based). So coming from PhP 4.* I moved into OOP, MVC and Cake..
I am building a site which Insitutes from difference COUNTRIES can use to store their data (And more). I am now building the basic per-institute registration, and would like to include a drop-down of countries.
I see two ways to approach this; Either retreive the country table information for a dropdown using the Country model:
$this->set('countries', ClassRegistry::init('Country')->getAllCountries());
(Followed by a function in \Model\Country.php)
or use the InstitutesController:
$this->set('countries', $this->Institute->Country->find('list', $params = array('fields' => array('id', 'country'))));
Which is the recommended route to take, as both seem to work?