Improved subscriber handling
- Signed routes - Manage subscriptions now sends an email link
This commit is contained in:
+21
-1
@@ -123,6 +123,22 @@ if (!function_exists('color_contrast')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('cachet_route_generator')) {
|
||||
/**
|
||||
* Generate the route string.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $method
|
||||
* @param string $domain
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function cachet_route_generator($name, $method = 'get', $domain = 'core')
|
||||
{
|
||||
return "{$domain}::{$method}:{$name}";
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('cachet_route')) {
|
||||
/**
|
||||
* Generate a URL to a named route, which resides in a given domain.
|
||||
@@ -136,7 +152,11 @@ if (!function_exists('cachet_route')) {
|
||||
*/
|
||||
function cachet_route($name, $parameters = [], $method = 'get', $domain = 'core')
|
||||
{
|
||||
return app('url')->route("{$domain}::{$method}:{$name}", $parameters, true);
|
||||
return app('url')->route(
|
||||
cachet_route_generator($name, $method, $domain),
|
||||
$parameters,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user