Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active August 24, 2020 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/b48e5c188744cfb1ea0d75659abb1cb2 to your computer and use it in GitHub Desktop.
Save parzibyte/b48e5c188744cfb1ea0d75659abb1cb2 to your computer and use it in GitHub Desktop.
<?php
$valorAleatorio = uniqid();
$slug = Str::of($titulo)->slug("-")->limit(255 - mb_strlen($valorAleatorio) - 1, "")->trim("-")->append("-", $valorAleatorio);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment