I've a question about the MVC in CakePHP. Normally, the model should take 
responsability for all the database queries.

However, in the cookbook documentation, it seems this isn't respected. See 
the following link: 
http://book.cakephp.org/2.0/en/getting-started.html#create-a-posts-controller

As you can see, the index action of PostsController contains "$this->Post->
find('all')". Shouldn't this and this code for example:

        $this->set('areas', $this->Attraction->Area->find('list', array(
>             'conditions' => array(
>                 'Area.deleted' => null
>             ),
>             'order' => array(
>                 'Area.sequence ASC',
>                 'Area.name ASC'
>             )
>         )));


not be in the Model part instead of in the controller part???

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to