Commit 4330124d authored by Taylor Otwell's avatar Taylor Otwell

added route:destination method.

parent 8737dde6
......@@ -218,4 +218,20 @@ class Route {
}));
}
/**
* Extract the URI string from a route destination.
*
* <code>
* // Returns "home/index" as the destination's URI
* $uri = Route::uri('GET /home/index');
* </code>
*
* @param string $destination
* @return string
*/
public static function destination($destination)
{
return trim(substr($destination, strpos($destination, '/')), '/') ?: '/';
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment