opened up bundles to live anywhere and respond to any URI.'

This commit is contained in:
Taylor Otwell
2012-01-26 14:37:43 -06:00
parent d3d3ffc168
commit 8dfb50c835
7 changed files with 128 additions and 75 deletions

View File

@@ -255,6 +255,17 @@ class Str {
return str_replace(' ', '_', static::title(str_replace($search, ' ', $value)));
}
/**
* Return the "URI" style segments in a given string.
*
* @param string $value
* @return array
*/
public static function segments($value)
{
return array_diff(explode('/', trim($value, '/')), array(''));
}
/**
* Generate a random alpha or alpha-numeric string.
*