Today I’ll show you how you can use cakePHP layout files and elements. This way you can easily create different layouts for your pages and with elements you can write efficient code instead of copy/pasting the same code over and over again.
Continue reading CakePHP Basics Tutorial – Part 5
In this tutorial I will show you the power of associations in cakePHP. With associations you can link up your models and get related data when you fetch results from one model.
In this example I’ll show you how to create an association between a User and a Product.
Continue reading CakePHP Basics Tutorial – Part 4
Since OSX 10.7 Apple has decided to hide the ~/Library folder from your users directory. When you are using the iPhone Simulator or other development applications, you spend a fair amount navigating around in the Library. So if you are tired of using command+shift+G all the time, you can easily unhide the Library folder forever and ever, without showing all the hidden files on your system!
Continue reading Unhide the Library folder on (Mountain) Lion
In this tutorial I’ll show you in about 30 minutes how to create a html form with the built-in FormHelper of CakePHP which automatically links up to the database fields to see what kind of input field should be generated. Further on we also check out the built-in validation options and how we can save our submitted form data to the database. And at the end I’ll explain how you can use CakePHP’s Model callback functions to put in our custom code before a CakePHP action.
Continue reading CakePHP Basics Tutorial – Part 2
In this tutorial I’ll show you in about 30 minutes how to do a basic setup of CakePHP and read some data from the database without writing any SQL! This will be an i-don’t-know-how-many-parts tutorial, but I’ll try to add every week a few until the basics are covered!
Continue reading CakePHP Basics Tutorial – Part 1
In this tutorial I’ll show you in 25 minutes how to generate some basic CRUD functionality into your CakePHP website without writing a single line of code! This can be done by using the console which you get for free with CakePHP.
This is a great way to get up’n’running in minutes and start from what CakePHP has generated for you.
Continue reading Generate code with CakePHP’s cake bake command
I’ve just upgraded my servers to PHP 5.4 and got this error when loading a project.
Declaration of MyModelName::beforeSave() should be compatible with Model::beforeSave( $options = array() )
There seems to be a problem when using PHP 5.4 and CakePHP 2.1 which results in this error. Since PHP 5.4
E_STRICT are now combined and with a default CakePHP installation error reporting is set to E_ALL & ~E_DEPRECATED!
Luckily it is really easy to fix!