A list of some things quite handy for every cake app and therefore best placed in the bootstrap.php as they are not (yet) part of the cake core. # Useful when putting a string together in PHP define('LF', PHP_EOL); define('NL',…
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); $this->Post->User->set($this->data); $val1 = $this->Post->validates(); $val2 = $this->Post->User->validates(); if ($val1 &&…
CakePHP and Subversion
A Quick How-To about properly setting up a svn for your cake app. First of all, we need to drop a "trunk" folder into our svn: /trunk inside this trunk, we now add /app (actual app) /vendors (global vendors) /cake…