On Mar 11, 11:51 pm, Alex Jeffery wrote:
> Hi,
Hi,
>
> (Fat Model)
> 1. The controller calls a custom function on the Users model. Eg
> registerUser($formData)
> 2. The User model validates and saves the new user.
> 3. The user model then calls the Portfolio model to create a new
> portfolio fo
+1 for your version 2 (Fat Model). It is the way I do things for
similar cases.
Sometimes you want to do it beforeSave (this model should be saved
only if the other model can be created)
and other times afterSave when things are the other way around.
afterSave has a helpful parameter so you can
Hi,
I am building a small cake application to learn MVC and cakePHP.
I have a question about where to put business logic, I have read that
controls should be skinny and models should be fat. Eg the business
rules should live in the models.
In my application I have the following models User, Port