Skip to content

Instantly share code, notes, and snippets.

@makamo
Last active August 29, 2015 14:25
Show Gist options
  • Save makamo/031d35ee9065bc674ffb to your computer and use it in GitHub Desktop.
Save makamo/031d35ee9065bc674ffb to your computer and use it in GitHub Desktop.
public function index() {
// if($this->request->is('ajax')){
$_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest';
// $this->request->allowMethod('ajax');
$this->loadComponent('Ajax.Ajax');
// }
$carottiers = [1=>'bgdyuvgfdfcyuwe',2=>'ubvyfuvbc'];
$this->set([$carottiers,'_serialize'=>['carottiers']]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment