Get the last error message from the current datasource
public static getLastError ( ) : string | ||
return | string | Error message (or empty string) |
public function deleteGroupAction(int $id) { if (Gatekeeper::deleteGroupById($id)) { $this->flasher->success('Group deleted'); } else { $this->flasher->error('Group not deleted.'); if ($this->site['debug']) { $this->flasher->error(Gatekeeper::getLastError()); } } $this->redirect('/users/groups'); }