Skip to content

SimpleSlug is an easy-to-use PHP library that allows you to create random, entertaining, and occasionally meaningful slugs (combinations).

Notifications You must be signed in to change notification settings

amirrh6/SimpleSlug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleSlug

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
*/

License:

GPL 2.0 only

About

SimpleSlug is an easy-to-use PHP library that allows you to create random, entertaining, and occasionally meaningful slugs (combinations).

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages