Created
February 12, 2016 10:09
-
-
Save frazr/248173591de8c5193c07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$company = $this->Companies->find()->where(['Companies.id' => $id])->contain(['ArticleGroups','Locations'])->first(); | |
if ($this->request->is(['patch', 'post', 'put'])) { | |
$company = $this->Companies->patchEntity($company, $this->request->data); | |
if ($this->Companies->save($company)) { | |
$this->Flash->success(__('The company has been saved.')); | |
} else { | |
$this->Flash->error(__('The company could not be saved. Please, try again.')); | |
} | |
} | |
debug($company); | |
die(); | |
$company = $this->paginate($company->locations); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment