{"id":27854107,"url":"https://github.com/teariot/beautyslug","last_synced_at":"2026-03-02T06:00:50.841Z","repository":{"id":290540445,"uuid":"974521494","full_name":"TeaRiot/BeautySlug","owner":"TeaRiot","description":"Lightweight PHP library for generating random readable slugs.","archived":false,"fork":false,"pushed_at":"2025-04-28T23:00:03.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T06:35:37.605Z","etag":null,"topics":["cms-friendly-slug","composer","friendly-url","laravel-slug","php","php-slug","random-slug","seo","seo-friendly-slug","seo-url","slug-generator","slugify","unique-slug","url-identifier","url-slug"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeaRiot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-28T22:59:49.000Z","updated_at":"2025-04-29T09:33:28.000Z","dependencies_parsed_at":"2025-04-29T11:12:39.427Z","dependency_job_id":null,"html_url":"https://github.com/TeaRiot/BeautySlug","commit_stats":null,"previous_names":["teariot/beautyslug"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TeaRiot/BeautySlug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaRiot%2FBeautySlug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaRiot%2FBeautySlug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaRiot%2FBeautySlug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaRiot%2FBeautySlug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeaRiot","download_url":"https://codeload.github.com/TeaRiot/BeautySlug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeaRiot%2FBeautySlug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29993531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms-friendly-slug","composer","friendly-url","laravel-slug","php","php-slug","random-slug","seo","seo-friendly-slug","seo-url","slug-generator","slugify","unique-slug","url-identifier","url-slug"],"created_at":"2025-05-04T08:58:03.302Z","updated_at":"2026-03-02T06:00:50.825Z","avatar_url":"https://github.com/TeaRiot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BeautySlug\n\n[![PHP Version](https://img.shields.io/badge/PHP-8.0%2B-blue.svg)](https://www.php.net/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n\n**BeautySlug** is a lightweight, flexible PHP library for generating beautiful, readable slugs.\n\n---\n\n## 🚀 Installation\n\nInstall via Composer:\n\n```bash\ncomposer require teariot/beautyslug\n```\n\n---\n\n## ⚡ Quick Usage\n\n```php\nuse BeautySlug\\BeautySlug;\nuse BeautySlug\\SlugWords;\n\n// Basic random slug\necho BeautySlug::slug(); \n// Example: wonderful-tree\n\n// Slug with a color and an animal\necho BeautySlug::slug([\n    SlugWords::color(1),\n    SlugWords::animal(1),\n]);\n// Example: blue-lion\n\n// Slug with digits appended\necho BeautySlug::slug([\n    SlugWords::adjective(1),\n    SlugWords::noun(1),\n], [\n    'appendDigits' =\u003e true,\n    'digitsCount' =\u003e 5,\n]);\n// Example: fancy-robot-48291\n```\n\n---\n\n## ⚙️ Options\n\n| Option         | Type     | Description                                  | Default |\n|----------------|----------|----------------------------------------------|---------|\n| `separator`    | `string`  | Separator between words                     | `-`     |\n| `appendDigits` | `bool`    | Append random digits at the end              | `false` |\n| `digitsCount`  | `int`     | Number of digits to append if enabled        | `4`     |\n\nYou can override options by passing an array as the second parameter to `slug()`.\n\n---\n\n## 🧩 Available Word Categories\n\nBeautySlug uses predefined word lists:\n\n- `adjective`\n- `noun`\n- `color`\n- `season`\n- `emoji`\n- `verb`\n- `animal`\n- `cosmos`\n\nYou can directly access random words:\n\n```php\nSlugWords::adjective(2); // Get 2 random adjectives\nSlugWords::noun(1);      // Get 1 random noun\nSlugWords::color(1);     // Get 1 random color\n```\n\n---\n\n## 📂 Example Script\n\nSee the [`examples/usage.php`](examples/usage.php) file for more examples.\n\nTo run:\n\n```bash\nphp examples/usage.php\n```\n\n---\n\n## 📄 License\n\nReleased under the [MIT License](LICENSE).\n\n---\n\n\u003e Built with ❤️ by [Teariot](https://github.com/teariot)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteariot%2Fbeautyslug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteariot%2Fbeautyslug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteariot%2Fbeautyslug/lists"}