This is the code from my cakephp learning session