This little trick will allow you toggle any field, for example ‘status’ which can be either 0 or 1…
Add this little function to your model or better yet, app model:
Update (9/16/2008): As some people pointed out it’s easier to use the h() method defined in basics.php of the core, it achieves the same basic goal, but since Sanitize class has other methods and purposes, I’m gong to leave this as an informational example and…
Let’s say you have a Posts controller, where you’ll need to paginate some posts in various actions.You might have some “generic settings” as the manual recommends in your $paginate variable similar to this:
Nice folks over at Packt Publishing asked me to a do a review of a book they’ve recently published, called “CakePHP Application Development”, by Ahsanul Bari and Anupom Syam. I was quite happy to oblige and not only because I got a free book, but also…