Skip to content

Instantly share code, notes, and snippets.

@dmsysop
Last active August 29, 2015 14:19
Show Gist options
  • Save dmsysop/56e458e46672b83e663a to your computer and use it in GitHub Desktop.
Save dmsysop/56e458e46672b83e663a to your computer and use it in GitHub Desktop.
if (!isset($this->data[$this->alias]['slug']) || empty($this->data[$this->alias]['slug'])) {
$this->data[$this->alias]['slug'] = Inflector::slug(strtolower($this->removeAcentos($this->data[$this->alias]['nome'])), '-');
} else {
$this->data[$this->alias]['slug'] = Inflector::slug(strtolower($this->removeAcentos($this->data[$this->alias]['slug'])), '-');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment