Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
# /app/Controller/OrdersController.php
class OrdersController extends AppController {
public function add() {
if ($this->request->is(array('post', 'put')) {
$this->Order->create();
if ($this->Order->saveAll($this->request->data, array('deep' => true)) {
$this->Session->setFlash('Ordine creato con successo');
//$this->redirect(array('action' => 'view', $this->Order->id);
}
}
$regions = $this->Order->Region->find('list');
$this->set(compact('regions'));
}
/*
* @todo Da fare
*/
public function view($id = null) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.