In moviesController i have a public function add() which normally needs to work with data from Movies table. (For example i can do $this->Movie->findById($id); or $this->Movie->save(); )
In the add view I have a form which takes input from a user and save it into database. All that works just fine.
But i would like to change this form a little, so there will be a list of genres (action, comedy, etc) and user will be able to select many of them. For now i just have an array with genre values which are used to populate checkboxes but I need to get this values from a table.
So the question I'm asking is, what is the way to get rows from other table Genres in moviesController in public function add() so i can populate a form list while still using main table?