Skip to content

Commit

Permalink
add slugify method
Browse files Browse the repository at this point in the history
  • Loading branch information
siddik-web committed Apr 20, 2022
1 parent f978c59 commit c8597d2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Stringify.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,18 @@ public function capitalize() : Stringify

return $this;
}

/**
* Text slugify function
*
* @return Stringify
*
* @since 1.0.6
*/
public function slugify() : Stringify
{
$this->text = str_replace(" ", "-", $this->lower($this->text)->getText());

return $this;
}
}

0 comments on commit c8597d2

Please sign in to comment.