added route:destination method.
This commit is contained in:
parent
8737dde682
commit
4330124d79
|
@ -218,4 +218,20 @@ public function handles($uri)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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, '/')), '/') ?: '/';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue