Recent Tweet
- I said 'like' so many times in a description of Journey I cried upon playback. 3 hours ago
I had to join two models together in order to search them properly. In this special case, it was pagination. I was browsing the cookbook for anything that could help and I did in fact find joining tables. I was doing something kind of bizarre and probably bad practice, but with CakePHP, there are no [...]
Passing optional information by URL is pretty easy in CakePHP. The Paginator does this all the time with the page:2 type-urls. Accessing the power of URL parameters, as CakePHP calls them, is slightly confusing at first. It’s not a method call or anything. Using $this->params is the location for URL parameters. If you run a [...]
Today I was using one of CakePHP’s helper methods, $text->truncate. It gave me these errors and I can’t say I was pleased about it. It reminded me that sometimes, functions aren’t a piece of cake. Warning (2): array_merge() [function.array-merge]: Argument #2 is not an array [CORE/cake/libs/view/helpers/text.php, line 184] Warning (2): extract() [function.extract]: First argument should [...]
I recently deployed a CakePHP application to a 1and1 server. I was presented with a wonderful 500 Internal Server Error. That only means one thing: a .htaccess was messed up somewhere. There were many places that pointed me in the right direction to fix this problem. It was definitely an annoying hitch. Seriously, there’s that [...]
CakePHP does make somethings really easy, and sometimes, not so easy. I like to have a testing setting and a production setting stored in my databases.php. Your DATABASE_CONFIG object of course contains those arrays of settings. So the question is, how do you switch exactly? It is never mentioned specifically in the documentation, but you [...]