Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created September 20, 2014 16:25
Show Gist options
  • Save taleeb35/bfa3df0fb7edb591f17e to your computer and use it in GitHub Desktop.
Save taleeb35/bfa3df0fb7edb591f17e to your computer and use it in GitHub Desktop.
Delete (Php)
public function delete($id = null) {
if($this->request->is('ajax')) {
//$this->layout = 'ajax';
$response = 'Fail';
if ($this->User->delete($id)) {
$response= 'OK';
}
$this->set('response', $response);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment