Quantcast
Channel: DerEuroMark » Model
Browsing all 4 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Validating multiple models at once

There are forms where you want to add/edit not only fields of the current model, but also of a related one (usually hasMany or belongsTo). Example: User and Post $this->Post->set($this->data);...

View Article



Image may be NSFW.
Clik here to view.

Working with models

Since there is so much to talk about it here, I will cut right to the chase. We all know about “Fat Models, Slim Controllers”. So basically, as much as possible of the code should be in the model. For...

View Article

Image may be NSFW.
Clik here to view.

Working with virtual fields in Cake1.3

In earlier versions of CakePHP we had to use Behaviors like “MultipleDisplayFields” or whatever. With $Model->virtualFields it is now possible to natively use find() methods combined with virtual...

View Article

Image may be NSFW.
Clik here to view.

Schema reference for table less models

If you ever need a table less model with only some manual schema information (mainly for validation and form helper to work), you might find the documentation a little bit incomplete. There are more...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images