Lost Array After Validation Error
- by Georges Kmeid
I'm working on a CakePHP project and I have User, Post and Location models among others.
User hasMany Location and Post belongsTo User so Location is not directly related to Post.
This is my code in the Post controller:
public function add() {
if ($this->request->is('get')) {
$this->loadModel('Location');
…