Guest User

Untitled

a guest
Jul 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. class UnicornsController
  2. {
  3. public function index($foo, $bar)
  4. {
  5. $this->set(
  6. array(
  7. 'unicorn' => $this->Unicorn->findByFooAndBar($foo, $bar);
  8. )
  9. );
  10. }
  11.  
  12. public function process()
  13. {
  14. $this->Unicorn->save($this->request->data);
  15. $this->redirect(
  16. 'action' => 'index',
  17. $this->request->data['Unicor']['foo'],
  18. $this->request->data['Unicor']['bar'],
  19. );
  20. }
  21. }
Add Comment
Please, Sign In to add comment