Completely refactor all routes
This commit is contained in:
@@ -139,3 +139,20 @@ if (!function_exists('array_numeric_sort')) {
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('cachet_route')) {
|
||||
/**
|
||||
* Generate a URL to a named route, which resides in a given domain.
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $parameters
|
||||
* @param string $method
|
||||
* @param string $domain
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function cachet_route($name, $parameters = [], $method = 'get', $domain = 'core')
|
||||
{
|
||||
return app('url')->route("{$domain}::{$method}:{$name}", $parameters, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user