I was wondering if it is possible to load models inside a controller
in the similar way as codeigniter does, and if there is a way, how to
do it
It would be something like this
class Blog_controller extends Controller {
function blog()
{
$this->load->model('users_model','um');
$this->load->model('pictures_model','pm');
$this->pm->findAll();
$data['users'] = $this->um->findAll();
$data['pictures'] = $this->pm->findAll();
$this->load->view('blog', $data);
}
}
Can I load more that a model in a cakephp controller, in the case I
need to acces more than one model in a controller?
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---