amirrh6 / simpleslug
SimpleSlug is a straightforward PHP library designed to help you generate amusing and meaningful combinations.
0.2.0
2024-11-02 13:49 UTC
README
SimpleSlug is an easy-to-use PHP library that allows you to create random, entertaining, and occasionally meaningful slugs (combinations).
Say goodbye to random strings like 'q8s46k0' and hello to catchy slugs like 'gigantic flat dog,' making them much easier to recognize.
SimpleSlug is still in early development stages so expect bugs and non-backward compatible changes.
Use Github Issues for comments, bug reports and questions.
Installation:
composer require amirrh6/simpleslug
Usage:
<?php require_once 'vendor/autoload.php'; $simpleSlug = new SimpleSlug\Engine(words_count: 3, capitalize_the_first_word: true); for ($x = 0; $x < 5; $x++) { if ($x == 1) { print_r($simpleSlug->generate(words_count: 4) . "\n"); } else { print_r($simpleSlug->generate() . "\n"); } } /* // May output something similar to: Cubic African rabbit Flat yellow Italian fox Curious blue lamp Italian traveling cat American leather cat */