Running into another issue that I just seem cant to find any information what could be causing.
I am declaring variable $makes and inside the view its not finding it.
here is my current code:
function makemodel($id = null) {
$this->Make->id = $id;
$makes = $this->Make->find('all', array(
'conditions' => array('id' => $id),
'contain' => array('Makemodel' => array('Road'))
)
);
}
}
?>
I have also tried this: $this->set->(‘makes’,$this->Make->find(script here));
Any advice would be appreciated thanks!
Are there any reference material other than cakePHP’s book?
Array
(
[0] => Array
(
[Make] => Array
(
[id] => 1
[url_make] => subaru
[MakeName] => Subaru
[MakeOrigin] => Japan
[Summary] =>
)
[Makemodel] => Array
(
[0] => Array
(
[id] => 1
[ModelName] => Impreza WRX
[make_id] => 1
[Road] => Array
(
[0] => Array
(
[id] => 3
[makemodel_id] => 1
[RoadTypeID] => 1
[name] => Dirt
)
[1] => Array
(
[id] => 4
[makemodel_id] => 1
[RoadTypeID] => 2
[name] => Snow
)
)
)
)
)
)
Assuming that the find call is working correctly, you have to pass the data from your controller to your view using the
set()method.