Completely refactor all routes

This commit is contained in:
James Brooks
2016-10-12 21:31:07 +01:00
parent 446e428486
commit 5a9f6134c4
90 changed files with 486 additions and 341 deletions

View File

@@ -105,7 +105,7 @@ class SendComponentUpdateEmailNotificationHandler
];
$mail['email'] = $subscriber->email;
$mail['manage_link'] = route('subscribe.manage', ['code' => $subscriber->verify_code]);
$mail['manage_link'] = cachet_route('subscribe.manage', [$subscriber->verify_code]);
$this->mailer->queue([
'html' => 'emails.components.update-html',

View File

@@ -119,8 +119,8 @@ class SendIncidentEmailNotificationHandler
'html_content' => $incident->formattedMessage,
'text_content' => $incident->message,
'token' => $subscriber->token,
'manage_link' => route('subscribe.manage', ['code' => $subscriber->verify_code]),
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'manage_link' => cachet_route('subscribe.manage', [$subscriber->verify_code]),
'unsubscribe_link' => cachet_route('subscribe.unsubscribe', [$subscriber->verify_code]),
];
$this->mailer->queue([

View File

@@ -116,8 +116,8 @@ class SendMaintenanceEmailNotificationHandler
'html_content' => $incident->formattedMessage,
'text_content' => $incident->message,
'token' => $subscriber->token,
'manage_link' => route('subscribe.manage', ['code' => $subscriber->verify_code]),
'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
'manage_link' => cachet_route('subscribe.manage', [$subscriber->verify_code]),
'unsubscribe_link' => cachet_route('subscribe.unsubscribe', [$subscriber->verify_code]),
];
$this->mailer->queue([

View File

@@ -48,7 +48,7 @@ class SendInviteUserEmailHandler
$mail = [
'email' => $event->invite->email,
'subject' => 'You have been invited.',
'link' => route('signup.invite', ['code' => $event->invite->code]),
'link' => cachet_route('signup.invite', [$event->invite->code]),
];
$this->mailer->queue([

View File

@@ -14,6 +14,13 @@ namespace CachetHQ\Cachet\Foundation\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Routing\Router;
/**
* This is the route service provider.
*
* @author James Brooks <james@alt-three.com>
* @author Joseph Cohen <joe@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
*/
class RouteServiceProvider extends ServiceProvider
{
/**
@@ -67,7 +74,7 @@ class RouteServiceProvider extends ServiceProvider
*/
public function map(Router $router)
{
$router->group(['namespace' => $this->namespace], function (Router $router) {
$router->group(['namespace' => $this->namespace, 'as' => 'core::'], function (Router $router) {
$path = app_path('Http/Routes');
foreach (glob("{$path}/*{,/*}.php", GLOB_BRACE) as $file) {

View File

@@ -58,17 +58,17 @@ class AuthController extends Controller
if (Auth::user()->hasTwoFactor) {
Session::put('2fa_id', Auth::user()->id);
return Redirect::route('auth.two-factor');
return cachet_route('auth.two-factor');
}
Auth::attempt($loginData, $rememberUser);
event(new UserLoggedInEvent(Auth::user()));
return Redirect::intended('dashboard');
return Redirect::intended(cachet_route('dashboard'));
}
return Redirect::route('auth.login')
return cachet_route('auth.login')
->withInput(Binput::except('password'))
->withError(trans('forms.login.invalid'));
}
@@ -113,11 +113,11 @@ class AuthController extends Controller
// Failed login, log back out.
Auth::logout();
return Redirect::route('auth.login')->withError(trans('forms.login.invalid-token'));
return cachet_route('auth.login')->withError(trans('forms.login.invalid-token'));
}
}
return Redirect::route('auth.login')->withError(trans('forms.login.invalid-token'));
return cachet_route('auth.login')->withError(trans('forms.login.invalid-token'));
}
/**

View File

@@ -23,7 +23,6 @@ use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\Tag;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
class ComponentController extends Controller
@@ -45,13 +44,13 @@ class ComponentController extends Controller
$this->subMenu = [
'components' => [
'title' => trans('dashboard.components.components'),
'url' => route('dashboard.components.index'),
'url' => cachet_route('dashboard.components'),
'icon' => 'ion-ios-browsers',
'active' => false,
],
'groups' => [
'title' => trans_choice('dashboard.components.groups.groups', 2),
'url' => route('dashboard.components.groups'),
'url' => cachet_route('dashboard.components.groups'),
'icon' => 'ion-folder',
'active' => false,
],
@@ -138,7 +137,7 @@ class ComponentController extends Controller
$componentData['enabled']
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.components.edit', ['id' => $component->id])
return cachet_route('dashboard.components.edit', [$component->id])
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.components.edit.failure')))
->withErrors($e->getMessageBag());
@@ -154,7 +153,7 @@ class ComponentController extends Controller
$component->tags()->sync($componentTags);
return Redirect::route('dashboard.components.edit', ['id' => $component->id])
return cachet_route('dashboard.components.edit', [$component->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.edit.success')));
}
@@ -191,7 +190,7 @@ class ComponentController extends Controller
$componentData['enabled']
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.components.add')
return cachet_route('dashboard.components.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.components.add.failure')))
->withErrors($e->getMessageBag());
@@ -207,7 +206,7 @@ class ComponentController extends Controller
$component->tags()->sync($componentTags);
return Redirect::route('dashboard.components.index')
return cachet_route('dashboard.components')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.add.success')));
}
@@ -222,7 +221,7 @@ class ComponentController extends Controller
{
dispatch(new RemoveComponentCommand($component));
return Redirect::route('dashboard.components.index')
return cachet_route('dashboard.components')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
}
@@ -237,7 +236,7 @@ class ComponentController extends Controller
{
dispatch(new RemoveComponentGroupCommand($group));
return Redirect::route('dashboard.components.groups')
return cachet_route('dashboard.components.groups')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.delete.success')));
}
@@ -281,13 +280,13 @@ class ComponentController extends Controller
Binput::get('visible')
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.components.groups.add')
return cachet_route('dashboard.components.groups.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.components.groups.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.components.groups')
return cachet_route('dashboard.components.groups')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.groups.add.success')));
}
@@ -309,13 +308,13 @@ class ComponentController extends Controller
Binput::get('visible')
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.components.groups.edit', ['id' => $group->id])
return cachet_route('dashboard.components.groups.edit', [$group->id])
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.components.groups.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.components.groups.edit', ['id' => $group->id])
return cachet_route('dashboard.components.groups.edit', [$group->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.components.groups.edit.success')));
}
}

View File

@@ -21,7 +21,6 @@ use Illuminate\Contracts\Auth\Guard;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Jenssegers\Date\Date;
@@ -83,7 +82,7 @@ class DashboardController extends Controller
*/
public function redirectAdmin()
{
return Redirect::route('dashboard.index');
return cachet_route('dashboard');
}
/**

View File

@@ -23,7 +23,6 @@ use CachetHQ\Cachet\Models\IncidentTemplate;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
/**
@@ -61,13 +60,13 @@ class IncidentController extends Controller
$this->subMenu = [
'incidents' => [
'title' => trans('dashboard.incidents.incidents'),
'url' => route('dashboard.incidents.index'),
'url' => cachet_route('dashboard.incidents'),
'icon' => 'ion-android-checkmark-circle',
'active' => true,
],
'schedule' => [
'title' => trans('dashboard.schedule.schedule'),
'url' => route('dashboard.schedule.index'),
'url' => cachet_route('dashboard.schedule'),
'icon' => 'ion-android-calendar',
'active' => false,
],
@@ -139,13 +138,13 @@ class IncidentController extends Controller
null
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.incidents.add')
return cachet_route('dashboard.incidents.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.incidents.index')
return cachet_route('dashboard.incidents')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.add.success')));
}
@@ -185,7 +184,7 @@ class IncidentController extends Controller
{
$template->delete();
return Redirect::route('dashboard.templates.index')
return cachet_route('dashboard.templates')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.delete.success')));
}
@@ -199,13 +198,13 @@ class IncidentController extends Controller
try {
IncidentTemplate::create(Binput::get('template'));
} catch (ValidationException $e) {
return Redirect::route('dashboard.templates.add')
return cachet_route('dashboard.templates.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.templates.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.templates.index')
return cachet_route('dashboard.templates')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.templates.add.success')));
}
@@ -220,7 +219,7 @@ class IncidentController extends Controller
{
dispatch(new RemoveIncidentCommand($incident));
return Redirect::route('dashboard.incidents.index')
return cachet_route('dashboard.incidents')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.delete.success')));
}
@@ -265,7 +264,7 @@ class IncidentController extends Controller
null
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.incidents.edit', ['id' => $incident->id])
return cachet_route('dashboard.incidents.edit', ['id' => $incident->id])
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.templates.edit.failure')))
->withErrors($e->getMessageBag());
@@ -275,7 +274,7 @@ class IncidentController extends Controller
$incident->component->update(['status' => Binput::get('component_status')]);
}
return Redirect::route('dashboard.incidents.edit', ['id' => $incident->id])
return cachet_route('dashboard.incidents.edit', ['id' => $incident->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.edit.success')));
}
@@ -291,12 +290,12 @@ class IncidentController extends Controller
try {
$template->update(Binput::get('template'));
} catch (ValidationException $e) {
return Redirect::route('dashboard.templates.edit', ['id' => $template->id])
return cachet_route('dashboard.templates.edit', ['id' => $template->id])
->withUpdatedTemplate($template)
->withTemplateErrors($e->getMessageBag()->getErrors());
}
return Redirect::route('dashboard.templates.edit', ['id' => $template->id])
return cachet_route('dashboard.templates.edit', ['id' => $template->id])
->withUpdatedTemplate($template);
}
@@ -329,13 +328,13 @@ class IncidentController extends Controller
$this->auth->user()
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.incidents.update', ['id' => $incident->id])
return cachet_route('dashboard.incidents.update', ['id' => $incident->id])
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.incidents.templates.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.incidents.index')
return cachet_route('dashboard.incidents')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.incidents.delete.success')));
}
}

View File

@@ -19,7 +19,6 @@ use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
class MetricController extends Controller
@@ -83,13 +82,13 @@ class MetricController extends Controller
$metricData['threshold']
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.metrics.add')
return cachet_route('dashboard.metrics.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.metrics.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.metrics.index')
return cachet_route('dashboard.metrics')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.add.success')));
}
@@ -115,7 +114,7 @@ class MetricController extends Controller
{
dispatch(new RemoveMetricCommand($metric));
return Redirect::route('dashboard.metrics.index')
return cachet_route('dashboard.metrics')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.delete.success')));
}
@@ -156,13 +155,13 @@ class MetricController extends Controller
Binput::get('threshold', null, false)
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.metrics.edit', ['id' => $metric->id])
return cachet_route('dashboard.metrics.edit', [$metric->id])
->withInput(Binput::all())
->withTitle(sprintf('<strong>%s</strong>', trans('dashboard.notifications.whoops')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.metrics.edit', ['id' => $metric->id])
return cachet_route('dashboard.metrics.edit', [$metric->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.metrics.edit.success')));
}
}

View File

@@ -18,7 +18,6 @@ use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentTemplate;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Illuminate\Support\MessageBag;
use Jenssegers\Date\Date;
@@ -42,13 +41,13 @@ class ScheduleController extends Controller
$this->subMenu = [
'incidents' => [
'title' => trans('dashboard.incidents.incidents'),
'url' => route('dashboard.incidents.index'),
'url' => cachet_route('dashboard.incidents'),
'icon' => 'ion-android-checkmark-circle',
'active' => false,
],
'schedule' => [
'title' => trans('dashboard.schedule.schedule'),
'url' => route('dashboard.schedule.index'),
'url' => cachet_route('dashboard.schedule'),
'icon' => 'ion-android-calendar',
'active' => true,
],
@@ -101,13 +100,13 @@ class ScheduleController extends Controller
Binput::get('scheduled_at')
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.schedule.add')
return cachet_route('dashboard.schedule.create')
->withInput(Binput::all())
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.schedule.index')
return cachet_route('dashboard.schedule')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.add.success')));
}
@@ -146,7 +145,7 @@ class ScheduleController extends Controller
$messageBag = new MessageBag();
$messageBag->add('scheduled_at', trans('validation.date', ['attribute' => 'scheduled time you supplied']));
return Redirect::route('dashboard.schedule.edit', ['id' => $schedule->id])->withErrors($messageBag);
return cachet_route('dashboard.schedule.edit', [$schedule->id])->withErrors($messageBag);
}
$scheduleData['scheduled_at'] = $scheduledAt;
@@ -156,13 +155,13 @@ class ScheduleController extends Controller
try {
$schedule->update($scheduleData);
} catch (ValidationException $e) {
return Redirect::route('dashboard.schedule.edit', ['id' => $schedule->id])
return cachet_route('dashboard.schedule.edit', [$schedule->id])
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.schedule.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.schedule.edit', ['id' => $schedule->id])
return cachet_route('dashboard.schedule.edit', [$schedule->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.edit.success')));
}
@@ -177,7 +176,7 @@ class ScheduleController extends Controller
{
$schedule->delete();
return Redirect::route('dashboard.schedule.index')
return cachet_route('dashboard.schedule')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.schedule.delete.success')));
}
}

View File

@@ -44,55 +44,55 @@ class SettingsController extends Controller
$this->subMenu = [
'setup' => [
'title' => trans('dashboard.settings.app-setup.app-setup'),
'url' => route('dashboard.settings.setup'),
'url' => cachet_route('dashboard.settings.setup'),
'icon' => 'ion-gear-b',
'active' => false,
],
'theme' => [
'title' => trans('dashboard.settings.theme.theme'),
'url' => route('dashboard.settings.theme'),
'url' => cachet_route('dashboard.settings.theme'),
'icon' => 'ion-paintbrush',
'active' => false,
],
'stylesheet' => [
'title' => trans('dashboard.settings.stylesheet.stylesheet'),
'url' => route('dashboard.settings.stylesheet'),
'url' => cachet_route('dashboard.settings.stylesheet'),
'icon' => 'ion-paintbucket',
'active' => false,
],
'customization' => [
'title' => trans('dashboard.settings.customization.customization'),
'url' => route('dashboard.settings.customization'),
'url' => cachet_route('dashboard.settings.customization'),
'icon' => 'ion-wand',
'active' => false,
],
'localization' => [
'title' => trans('dashboard.settings.localization.localization'),
'url' => route('dashboard.settings.localization'),
'url' => cachet_route('dashboard.settings.localization'),
'icon' => 'ion-earth',
'active' => false,
],
'security' => [
'title' => trans('dashboard.settings.security.security'),
'url' => route('dashboard.settings.security'),
'url' => cachet_route('dashboard.settings.security'),
'icon' => 'ion-lock-combination',
'active' => false,
],
'analytics' => [
'title' => trans('dashboard.settings.analytics.analytics'),
'url' => route('dashboard.settings.analytics'),
'url' => cachet_route('dashboard.settings.analytics'),
'icon' => 'ion-stats-bars',
'active' => false,
],
'log' => [
'title' => trans('dashboard.settings.log.log'),
'url' => route('dashboard.settings.log'),
'url' => cachet_route('dashboard.settings.log'),
'icon' => 'ion-document-text',
'active' => false,
],
'credits' => [
'title' => trans('dashboard.settings.credits.credits'),
'url' => route('dashboard.settings.credits'),
'url' => cachet_route('dashboard.settings.credits'),
'icon' => 'ion-ios-list',
'active' => false,
],

View File

@@ -18,7 +18,6 @@ use CachetHQ\Cachet\Models\Subscriber;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
class SubscriberController extends Controller
@@ -62,13 +61,13 @@ class SubscriberController extends Controller
dispatch(new SubscribeSubscriberCommand($subscriber, $verified));
}
} catch (ValidationException $e) {
return Redirect::route('dashboard.subscribers.add')
return cachet_route('dashboard.subscribers.create')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.subscribers.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.subscribers.add')
return cachet_route('dashboard.subscribers.create')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.subscribers.add.success')));
}
@@ -85,6 +84,6 @@ class SubscriberController extends Controller
{
dispatch(new UnsubscribeSubscriberCommand($subscriber));
return Redirect::route('dashboard.subscribers.index');
return cachet_route('dashboard.subscribers');
}
}

View File

@@ -18,7 +18,6 @@ use CachetHQ\Cachet\Bus\Commands\User\RemoveUserCommand;
use CachetHQ\Cachet\Models\User;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
class TeamController extends Controller
@@ -88,13 +87,13 @@ class TeamController extends Controller
Binput::get('level')
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.team.add')
return cachet_route('dashboard.team.create')
->withInput(Binput::except('password'))
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.add.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.team.add')
return cachet_route('dashboard.team.create')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.add.success')));
}
@@ -112,13 +111,13 @@ class TeamController extends Controller
try {
$user->update($userData);
} catch (ValidationException $e) {
return Redirect::route('dashboard.team.edit', ['id' => $user->id])
return cachet_route('dashboard.team.edit', [$user->id])
->withInput($userData)
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.team.edit', ['id' => $user->id])
return cachet_route('dashboard.team.edit', [$user->id])
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
}
@@ -134,13 +133,13 @@ class TeamController extends Controller
array_unique(array_filter((array) Binput::get('emails')))
));
} catch (ValidationException $e) {
return Redirect::route('dashboard.team.invite')
return cachet_route('dashboard.team.invite')
->withInput(Binput::except('password'))
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.invite.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.team.invite')
return cachet_route('dashboard.team.invite')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.invite.success')));
}
@@ -155,7 +154,7 @@ class TeamController extends Controller
{
dispatch(new RemoveUserCommand($user));
return Redirect::route('dashboard.team.index')
return cachet_route('dashboard.team')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.delete.success')));
}
}

View File

@@ -19,7 +19,6 @@ use CachetHQ\Cachet\Models\User;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use PragmaRX\Google2FA\Vendor\Laravel\Facade as Google2FA;
@@ -59,13 +58,13 @@ class UserController extends Controller
try {
Auth::user()->update($userData);
} catch (ValidationException $e) {
return Redirect::route('dashboard.user')
return cachet_route('dashboard.user')
->withInput($userData)
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.team.edit.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('dashboard.user')
return cachet_route('dashboard.user')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
}
@@ -83,6 +82,6 @@ class UserController extends Controller
event(new UserRegeneratedApiTokenEvent($user));
return Redirect::route('dashboard.user');
return cachet_route('dashboard.user');
}
}

View File

@@ -104,7 +104,7 @@ class FeedController extends Controller
$this->feed->add(
$incident->name,
Config::get('setting.app_name'),
Str::canonicalize(route('incident', ['id' => $incident->id])),
Str::canonicalize(cachet_route('incident', [$incident->id])),
$isRss ? $incident->created_at->toRssString() : $incident->created_at->toAtomString(),
$isRss ? $incident->message : Markdown::convertToHtml($incident->message)
);

View File

@@ -19,7 +19,6 @@ use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Validator;
@@ -268,14 +267,14 @@ class SetupController extends Controller
return Response::json(['status' => 1]);
}
return Redirect::to('dashboard');
return cachet_route('dashboard');
}
if (Request::ajax()) {
return Response::json(['errors' => $v->getMessageBag()], 400);
}
return Redirect::route('setup.index')->withInput()->withErrors($v->getMessageBag());
return cachet_route('setup')->withInput()->withErrors($v->getMessageBag());
}
/**

View File

@@ -18,7 +18,6 @@ use CachetHQ\Cachet\Models\Invite;
use CachetHQ\Cachet\Models\User;
use GrahamCampbell\Binput\Facades\Binput;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -77,7 +76,7 @@ class SignupController extends Controller
User::LEVEL_USER
));
} catch (ValidationException $e) {
return Redirect::route('signup.invite', ['code' => $invite->code])
return cachet_route('signup.invite', [$invite->code])
->withInput(Binput::except('password'))
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.signup.failure')))
->withErrors($e->getMessageBag());
@@ -85,7 +84,7 @@ class SignupController extends Controller
dispatch(new ClaimInviteCommand($invite));
return Redirect::route('status-page')
return cachet_route('status-page')
->withSuccess(sprintf('<strong>%s</strong> %s', trans('dashboard.notifications.awesome'), trans('cachet.signup.success')));
}
}

View File

@@ -26,7 +26,6 @@ use GrahamCampbell\Markdown\Facades\Markdown;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -63,17 +62,17 @@ class SubscribeController extends Controller
try {
$subscription = dispatch(new SubscribeSubscriberCommand($email, $verified));
} catch (ValidationException $e) {
return Redirect::route('status-page')
return cachet_route('status-page')
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))
->withErrors($e->getMessageBag());
}
if ($subscription->is_verified) {
return Redirect::route('status-page')->withSuccess(trans('cachet.subscriber.email.already-subscribed', ['email' => $email]));
return cachet_route('status-page')->withSuccess(trans('cachet.subscriber.email.already-subscribed', ['email' => $email]));
}
return Redirect::route('subscribe.manage', $subscription->verify_code)
return cachet_route('subscribe.manage', $subscription->verify_code)
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
}
@@ -100,7 +99,7 @@ class SubscribeController extends Controller
dispatch(new VerifySubscriberCommand($subscriber));
}
return Redirect::route('status-page')
return cachet_route('status-page')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.verified')));
}
@@ -130,7 +129,7 @@ class SubscribeController extends Controller
dispatch(new UnsubscribeSubscriberCommand($subscriber, $subscription));
}
return Redirect::route('status-page')
return cachet_route('status-page')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.unsubscribed')));
}
@@ -185,13 +184,13 @@ class SubscribeController extends Controller
try {
dispatch(new UpdateSubscriberSubscriptionCommand($subscriber, Binput::get('subscriptions')));
} catch (ValidationException $e) {
return Redirect::route('subscribe.manage', $subscriber->verify_code)
return cachet_route('subscribe.manage', $subscriber->verify_code)
->withInput(Binput::all())
->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('cachet.subscriber.email.failure')))
->withErrors($e->getMessageBag());
}
return Redirect::route('subscribe.manage', $subscriber->verify_code)
return cachet_route('subscribe.manage', $subscriber->verify_code)
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed')));
}
}

View File

@@ -14,7 +14,6 @@ namespace CachetHQ\Cachet\Http\Middleware;
use Closure;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
/**
* This is the setup already completed middelware class.
@@ -55,7 +54,7 @@ class SetupAlreadyCompleted
public function handle(Request $request, Closure $next)
{
if ($this->config->get('setting.app_name')) {
return Redirect::route('dashboard.index');
return cachet_route('dashboard');
}
return $next($request);

View File

@@ -13,7 +13,6 @@ namespace CachetHQ\Cachet\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
/**
* This is the subscribers configured middleware class.
@@ -34,7 +33,7 @@ class SubscribersConfigured
public function handle(Request $request, Closure $next)
{
if (!subscribers_enabled()) {
return Redirect::route('status-page');
return cachet_route('status-page');
}
return $next($request);

View File

@@ -29,7 +29,11 @@ class ApiRoutes
*/
public function map(Registrar $router)
{
$router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => ['api']], function (Registrar $router) {
$router->group([
'namespace' => 'Api',
'prefix' => 'api/v1',
'middleware' => ['api'],
], function (Registrar $router) {
$router->group(['middleware' => ['auth.api']], function (Registrar $router) {
$router->get('ping', 'GeneralController@ping');
$router->get('version', 'GeneralController@version');

View File

@@ -29,30 +29,35 @@ class AuthRoutes
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'middleware' => ['web', 'ready'], 'prefix' => 'auth'], function (Registrar $router) {
$router->group([
'middleware' => ['web', 'ready'],
'prefix' => 'auth',
], function (Registrar $router) {
$router->get('login', [
'as' => 'get:auth.login',
'middleware' => 'guest',
'as' => 'login',
'uses' => 'AuthController@showLogin',
]);
$router->post('login', [
'as' => 'post:auth.login',
'middleware' => ['guest', 'throttle:10,10'],
'uses' => 'AuthController@postLogin',
]);
$router->get('2fa', [
'as' => 'two-factor',
'as' => 'get:auth.two-factor',
'uses' => 'AuthController@showTwoFactorAuth',
]);
$router->post('2fa', [
'as' => 'post:auth.two-factor',
'middleware' => ['throttle:10,10'],
'uses' => 'AuthController@postTwoFactor',
]);
$router->get('logout', [
'as' => 'logout',
'as' => 'get:auth.logout',
'uses' => 'AuthController@logoutAction',
'middleware' => 'auth',
]);

View File

@@ -33,7 +33,6 @@ class ApiRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.api.',
'prefix' => 'dashboard/api',
], function (Registrar $router) {
$router->get('incidents/templates', 'ApiController@getIncidentTemplate');

View File

@@ -30,12 +30,15 @@ class BaseRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'auth'], 'namespace' => 'Dashboard'], function (Registrar $router) {
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
], function (Registrar $router) {
$router->get('admin', 'DashboardController@redirectAdmin');
$router->group(['prefix' => 'dashboard', 'as' => 'dashboard.'], function (Registrar $router) {
$router->group(['prefix' => 'dashboard'], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard',
'uses' => 'DashboardController@showDashboard',
]);
});

View File

@@ -33,39 +33,61 @@ class ComponentRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.components.',
'prefix' => 'dashboard/components',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.components',
'uses' => 'ComponentController@showComponents',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.components.create',
'uses' => 'ComponentController@showAddComponent',
]);
$router->post('add', 'ComponentController@createComponentAction');
$router->post('create', [
'as' => 'post:dashboard.components.create',
'uses' => 'ComponentController@createComponentAction',
]);
$router->get('groups', [
'as' => 'groups',
'as' => 'get:dashboard.components.groups',
'uses' => 'ComponentController@showComponentGroups',
]);
$router->get('groups/add', [
'as' => 'groups.add',
$router->get('groups/create', [
'as' => 'get:dashboard.components.groups.create',
'uses' => 'ComponentController@showAddComponentGroup',
]);
$router->get('groups/edit/{component_group}', [
'as' => 'groups.edit',
$router->post('groups/create', [
'as' => 'post:dashboard.components.groups.create',
'uses' => 'ComponentController@postAddComponentGroup',
]);
$router->get('groups/{component_group}', [
'as' => 'get:dashboard.components.groups.edit',
'uses' => 'ComponentController@showEditComponentGroup',
]);
$router->post('groups/edit/{component_group}', 'ComponentController@updateComponentGroupAction');
$router->delete('groups/{component_group}/delete', 'ComponentController@deleteComponentGroupAction');
$router->post('groups/add', 'ComponentController@postAddComponentGroup');
$router->get('{component}/edit', [
'as' => 'edit',
$router->post('groups/{component_group}', [
'as' => 'post:dashboard.components.groups.edit',
'uses' => 'ComponentController@updateComponentGroupAction',
]);
$router->delete('groups/{component_group}', [
'as' => 'delete:dashboard.components.groups.delete',
'uses' => 'ComponentController@deleteComponentGroupAction',
]);
$router->get('{component}', [
'as' => 'get:dashboard.components.edit',
'uses' => 'ComponentController@showEditComponent',
]);
$router->delete('{component}/delete', 'ComponentController@deleteComponentAction');
$router->post('{component}/edit', 'ComponentController@updateComponentAction');
$router->post('{component}', [
'as' => 'post:dashboard.components.edit',
'uses' => 'ComponentController@updateComponentAction',
]);
$router->delete('{component}', [
'as' => 'delete:dashboard.components.delete',
'uses' => 'ComponentController@deleteComponentAction',
]);
});
}
}

View File

@@ -33,32 +33,43 @@ class IncidentRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.incidents.',
'prefix' => 'dashboard/incidents',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.incidents',
'uses' => 'IncidentController@showIncidents',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.incidents.create',
'uses' => 'IncidentController@showAddIncident',
]);
$router->post('add', 'IncidentController@createIncidentAction');
$router->delete('{incident}/delete', [
'as' => 'delete',
'uses' => 'IncidentController@deleteIncidentAction',
$router->post('create', [
'as' => 'post:dashboard.incidents.create',
'uses' => 'IncidentController@createIncidentAction',
]);
$router->get('{incident}/edit', [
'as' => 'edit',
$router->get('{incident}', [
'as' => 'get:dashboard.incidents.edit',
'uses' => 'IncidentController@showEditIncidentAction',
]);
$router->get('{incident}/update', [
'as' => 'update',
$router->post('{incident}', [
'as' => 'post:dashboard.incidents.edit',
'uses' => 'IncidentController@editIncidentAction',
]);
$router->delete('{incident}', [
'as' => 'delete:dashboard.incidents.delete',
'uses' => 'IncidentController@deleteIncidentAction',
]);
$router->get('{incident}/updates', [
'as' => 'get:dashboard.incidents.updates',
'uses' => 'IncidentController@showIncidentUpdateAction',
]);
$router->post('{incident}/edit', 'IncidentController@editIncidentAction');
$router->post('{incident}/update', 'IncidentController@createIncidentUpdateAction');
$router->post('{incident}/updates', [
'as' => 'post:dashboard.incidents.updates',
'uses' => 'IncidentController@createIncidentUpdateAction',
]);
});
}
}

View File

@@ -33,24 +33,34 @@ class MetricRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.metrics.',
'prefix' => 'dashboard/metrics',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.metrics',
'uses' => 'MetricController@showMetrics',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.metrics.create',
'uses' => 'MetricController@showAddMetric',
]);
$router->post('add', 'MetricController@createMetricAction');
$router->delete('{metric}/delete', 'MetricController@deleteMetricAction');
$router->get('{metric}/edit', [
'as' => 'edit',
$router->post('create', [
'as' => 'post:dashboard.metrics.create',
'uses' => 'MetricController@createMetricAction',
]);
$router->get('{metric}', [
'as' => 'get:dashboard.metrics.edit',
'uses' => 'MetricController@showEditMetricAction',
]);
$router->post('{metric}/edit', 'MetricController@editMetricAction');
$router->post('{metric}', [
'as' => 'post:dashboard.metrics.edit',
'uses' => 'MetricController@editMetricAction',
]);
$router->delete('{metric}', [
'as' => 'delete:dashboard.metrics.delete',
'uses' => 'MetricController@deleteMetricAction',
]);
});
}
}

View File

@@ -33,25 +33,32 @@ class ScheduleRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.schedule.',
'prefix' => 'dashboard/schedule',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.schedule',
'uses' => 'ScheduleController@showIndex',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.schedule.create',
'uses' => 'ScheduleController@showAddSchedule',
]);
$router->post('add', 'ScheduleController@addScheduleAction');
$router->get('{incident}/edit', [
'as' => 'edit',
$router->post('create', [
'as' => 'post:dashboard.schedule.create',
'uses' => 'ScheduleController@addScheduleAction',
]);
$router->get('{incident}', [
'as' => 'get:dashboard.schedule.edit',
'uses' => 'ScheduleController@showEditSchedule',
]);
$router->post('{incident}/edit', 'ScheduleController@editScheduleAction');
$router->delete('{incident}/delete', [
'as' => 'delete',
$router->post('{incident}', [
'as' => 'post:dashboard.schedule.edit',
'uses' => 'ScheduleController@editScheduleAction',
]);
$router->delete('{incident}', [
'as' => 'delete:dashboard.schedule.delete',
'uses' => 'ScheduleController@deleteScheduleAction',
]);
});

View File

@@ -33,46 +33,49 @@ class SettingRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.settings.',
'prefix' => 'dashboard/settings',
], function (Registrar $router) {
$router->get('setup', [
'as' => 'setup',
'as' => 'get:dashboard.settings.setup',
'uses' => 'SettingsController@showSetupView',
]);
$router->get('analytics', [
'as' => 'analytics',
'as' => 'get:dashboard.settings.analytics',
'uses' => 'SettingsController@showAnalyticsView',
]);
$router->get('localization', [
'as' => 'localization',
'as' => 'get:dashboard.settings.localization',
'uses' => 'SettingsController@showLocalizationView',
]);
$router->get('security', [
'as' => 'security',
'as' => 'get:dashboard.settings.security',
'uses' => 'SettingsController@showSecurityView',
]);
$router->get('theme', [
'as' => 'theme',
'as' => 'get:dashboard.settings.theme',
'uses' => 'SettingsController@showThemeView',
]);
$router->get('stylesheet', [
'as' => 'stylesheet',
'as' => 'get:dashboard.settings.stylesheet',
'uses' => 'SettingsController@showStylesheetView',
]);
$router->get('customization', [
'as' => 'customization',
'as' => 'get:dashboard.settings.customization',
'uses' => 'SettingsController@showCustomizationView',
]);
$router->get('credits', [
'as' => 'credits',
'as' => 'get:dashboard.settings.credits',
'uses' => 'SettingsController@showCreditsView',
]);
$router->get('log', [
'as' => 'log',
'as' => 'get:dashboard.settings.log',
'uses' => 'SettingsController@showLogView',
]);
$router->post('/', 'SettingsController@postSettings');
$router->post('/', [
'as' => 'post:dashboard.settings',
'uses' => 'SettingsController@postSettings',
]);
});
}
}

View File

@@ -33,19 +33,26 @@ class SubscriberRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.subscribers.',
'prefix' => 'dashboard/subscribers',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.subscribers',
'uses' => 'SubscriberController@showSubscribers',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.subscribers.create',
'uses' => 'SubscriberController@showAddSubscriber',
]);
$router->post('add', 'SubscriberController@createSubscriberAction');
$router->delete('{subscriber}/delete', 'SubscriberController@deleteSubscriberAction');
$router->post('create', [
'as' => 'post:dashboard.subscribers.create',
'uses' => 'SubscriberController@createSubscriberAction',
]);
$router->delete('{subscriber}/delete', [
'as' => 'delete:dashbpard.subscribers.delete',
'uses' => 'SubscriberController@deleteSubscriberAction',
]);
});
}
}

View File

@@ -33,28 +33,44 @@ class TeamRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.team.',
'prefix' => 'dashboard/team',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.team',
'uses' => 'TeamController@showTeamView',
]);
$router->group(['middleware' => 'admin'], function (Registrar $router) {
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.team.create',
'uses' => 'TeamController@showAddTeamMemberView',
]);
$router->post('create', [
'as' => 'post:dashboard.team.create',
'uses' => 'TeamController@postAddUser',
]);
$router->get('invite', [
'as' => 'invite',
'as' => 'get:dashboard.team.invite',
'uses' => 'TeamController@showInviteTeamMemberView',
]);
$router->get('{user}', ['as' => 'edit', 'uses' => 'TeamController@showTeamMemberView']);
$router->post('add', 'TeamController@postAddUser');
$router->post('invite', 'TeamController@postInviteUser');
$router->post('{user}', 'TeamController@postUpdateUser');
$router->delete('{user}/delete', 'TeamController@deleteUser');
$router->post('invite', [
'as' => 'post:dashboard.team.invite',
'uses' => 'TeamController@postInviteUser',
]);
$router->get('{user}', [
'as' => 'get:dashboard.team.edit',
'uses' => 'TeamController@showTeamMemberView',
]);
$router->post('{user}', [
'as' => 'post::dashboard.team.edit',
'uses' => 'TeamController@postUpdateUser',
]);
$router->delete('{user}', [
'as' => 'delete:dashboard.team.delete',
'uses' => 'TeamController@deleteUser',
]);
});
});
}

View File

@@ -33,24 +33,34 @@ class TemplateRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.templates.',
'prefix' => 'dashboard/templates',
], function (Registrar $router) {
$router->get('/', [
'as' => 'index',
'as' => 'get:dashboard.templates',
'uses' => 'IncidentController@showTemplates',
]);
$router->get('add', [
'as' => 'add',
$router->get('create', [
'as' => 'get:dashboard.templates.create',
'uses' => 'IncidentController@showAddIncidentTemplate',
]);
$router->post('add', 'IncidentController@createIncidentTemplateAction');
$router->get('{incident_template}/edit', [
'as' => 'edit',
$router->post('create', [
'as' => 'post:dashboard.templates.create',
'uses' => 'IncidentController@createIncidentTemplateAction',
]);
$router->get('{incident_template}', [
'as' => 'get:dashboard.templates.edit',
'uses' => 'IncidentController@showEditTemplateAction',
]);
$router->post('{incident_template}/edit', 'IncidentController@editTemplateAction');
$router->delete('{incident_template}/delete', 'IncidentController@deleteTemplateAction');
$router->post('{incident_template}', [
'as' => 'post:dashboard.templates.edit',
'uses' => 'IncidentController@editTemplateAction',
]);
$router->delete('{incident_template}', [
'as' => 'delete::dashboard.templates.delete',
'uses' => 'IncidentController@deleteTemplateAction',
]);
});
}
}

View File

@@ -33,15 +33,21 @@ class UserRoutes
$router->group([
'middleware' => ['web', 'auth'],
'namespace' => 'Dashboard',
'as' => 'dashboard.user.',
'prefix' => 'dashboard/user',
], function (Registrar $router) {
$router->get('/', [
'as' => 'user',
'as' => 'get:dashboard.user',
'uses' => 'UserController@showUser',
]);
$router->post('/', 'UserController@postUser');
$router->get('{user}/api/regen', 'UserController@regenerateApiKey');
$router->post('/', [
'as' => 'post:dashboard.user',
'uses' => 'UserController@postUser',
]);
$router->get('{user}/api/regen', [
'as' => 'get:dashboard.user.api.regen',
'uses' => 'UserController@regenerateApiKey',
]);
});
}
}

View File

@@ -29,13 +29,16 @@ class FeedRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready'], 'as' => 'feed.'], function (Registrar $router) {
$router->group([
'middleware' => ['web', 'ready'],
], function (Registrar $router) {
$router->get('/atom/{component_group?}', [
'as' => 'atom',
'as' => 'get:feed.atom',
'uses' => 'FeedController@atomAction',
]);
$router->get('/rss/{component_group?}', [
'as' => 'rss',
'as' => 'get:feed.rss',
'uses' => 'FeedController@rssAction',
]);
});

View File

@@ -30,11 +30,29 @@ class SetupRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'setup']], function (Registrar $router) {
$router->get('setup', 'SetupController@getIndex');
$router->post('setup/step1', 'SetupController@postStep1');
$router->post('setup/step2', 'SetupController@postStep2');
$router->post('setup/step3', 'SetupController@postStep3');
$router->group([
'middleware' => ['web', 'setup'],
'prefix' => 'setup',
], function (Registrar $router) {
$router->get('/', [
'as' => 'get:setup',
'uses' => 'SetupController@getIndex',
]);
$router->post('step1', [
'as' => 'post:setup.step1',
'uses' => 'SetupController@postStep1',
]);
$router->post('step2', [
'as' => 'post:setup.step2',
'uses' => 'SetupController@postStep2',
]);
$router->post('step3', [
'as' => 'post:setup.step3',
'uses' => 'SetupController@postStep3',
]);
});
}
}

View File

@@ -29,13 +29,17 @@ class SignupRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function (Registrar $router) {
$router->get('signup/invite/{code}', [
'as' => 'invite',
$router->group([
'middleware' => ['web', 'ready', 'guest'],
'prefix' => 'signup',
], function (Registrar $router) {
$router->get('invite/{code}', [
'as' => 'get:signup.invite',
'uses' => 'SignupController@getSignup',
]);
$router->post('signup/invite/{code}', [
$router->post('invite/{code}', [
'as' => 'post:signup.invite',
'uses' => 'SignupController@postSignup',
]);
});

View File

@@ -29,23 +29,28 @@ class StatusPageRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'localize']], function (Registrar $router) {
$router->group([
'middleware' => ['web', 'ready', 'localize'],
], function (Registrar $router) {
$router->get('/', [
'as' => 'status-page',
'as' => 'get:status-page',
'uses' => 'StatusPageController@showIndex',
]);
$router->get('incident/{incident}', [
'as' => 'incident',
$router->get('incidents/{incident}', [
'as' => 'get:incident',
'uses' => 'StatusPageController@showIncident',
]);
$router->get('metrics/{metric}', [
'as' => 'metrics',
'as' => 'get:metric',
'uses' => 'StatusPageController@getMetrics',
]);
$router->get('component/{component}/shield', 'StatusPageController@showComponentBadge');
$router->get('component/{component}/shield', [
'as' => 'get:component_shield',
'uses' => 'StatusPageController@showComponentBadge',
]);
});
}
}

View File

@@ -29,33 +29,34 @@ class SubscribeRoutes
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'localize', 'subscribers'], 'as' => 'subscribe.'], function (Registrar $router) {
$router->group([
'middleware' => ['web', 'ready', 'localize', 'subscribers'],
], function (Registrar $router) {
$router->get('subscribe', [
'as' => 'subscribe',
'as' => 'get:subscribe',
'uses' => 'SubscribeController@showSubscribe',
]);
$router->post('subscribe', [
'as' => 'post:subscribe',
'uses' => 'SubscribeController@postSubscribe',
]);
$router->get('subscribe/manage/{code}', [
'as' => 'manage',
'as' => 'get:subscribe.manage',
'uses' => 'SubscribeController@showManage',
]);
$router->post('subscribe/manage/{code}', [
'as' => 'manage',
'as' => 'post:subscribe.manage',
'uses' => 'SubscribeController@postManage',
]);
$router->get('subscribe/verify/{code}', [
'as' => 'verify',
'as' => 'get:subscribe.verify',
'uses' => 'SubscribeController@getVerify',
]);
$router->get('unsubscribe/{code}/{subscription?}', [
'as' => 'unsubscribe',
'as' => 'get:subscribe.unsubscribe',
'uses' => 'SubscribeController@getUnsubscribe',
]);
});

View File

@@ -258,7 +258,7 @@ class IncidentPresenter extends BasePresenter implements Arrayable
*/
public function permalink()
{
return route('incident', $this->wrappedObject->id);
return cachet_route('incident', [$this->wrappedObject->id]);
}
/**

View File

@@ -153,7 +153,7 @@ class IncidentUpdatePresenter extends BasePresenter implements Arrayable
*/
public function permalink()
{
return route('incident', ['incident' => $this->wrappedObject->incident]).'#update-'.$this->wrappedObject->id;
return cachet_route('incident', [$this->wrappedObject->incident]).'#update-'.$this->wrappedObject->id;
}
/**

View File

@@ -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);
}
}

View File

@@ -10,7 +10,7 @@
<img src="{{ asset('/img/cachet-logo@2x.png') }}" class="img-responsive">
</div>
<form method="POST" action="{{ route('auth.login', [], false) }}" accept-charset="UTF-8" autocomplete="off" name="{{ str_random(10) }}">
<form method="POST" action="{{ cachet_route('auth.login', [], 'post') }}" accept-charset="UTF-8" autocomplete="off" name="{{ str_random(10) }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@if(Session::has('error'))
@@ -36,7 +36,7 @@
<div class="form-group">
<div class="row">
<div class="col-xs-2">
<a class="btn btn-default btn-lg btn-trans" href="{{ route('status-page') }}">
<a class="btn btn-default btn-lg btn-trans" href="{{ cachet_route('status-page') }}">
<span class="text-center">
<i class="ion ion-home"></i>
</span>

View File

@@ -18,7 +18,7 @@
<h3>{{ trans('dashboard.login.two-factor') }}</h3>
</div>
<br>
<form method="POST" action="{{ route('auth.two-factor') }}" accept-charset="UTF-8">
<form method="POST" action="{{ cachet_route('auth.two-factor', [], 'post') }}" accept-charset="UTF-8">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>

View File

@@ -14,7 +14,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="CreateComponentForm" class="form-vertical" role="form" action="/dashboard/components/add" method="POST">
<form name="CreateComponentForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.components.create', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -69,7 +69,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.create') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.components.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.components') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -14,7 +14,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="EditComponentForm" class="form-vertical" role="form" action="/dashboard/components/{{ $component->id }}/edit" method="POST">
<form name="EditComponentForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.components.edit', [$component->id], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -70,7 +70,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.save') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.components.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.components') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -14,7 +14,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="CreateComponentGroupForm" class="form-vertical" role="form" action="/dashboard/components/groups/add" method="POST">
<form name="CreateComponentGroupForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.components.groups.create', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -40,7 +40,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.components.groups') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.components.groups') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -40,7 +40,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.save') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.components.groups') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.components.groups') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -10,7 +10,7 @@
<span class="uppercase">
<i class="ion ion-ios-keypad"></i> {{ trans_choice('dashboard.components.groups.groups', 2) }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.components.groups.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.components.groups.create') }}">
{{ trans('dashboard.components.groups.add.title') }}
</a>
<div class="clearfix"></div>
@@ -30,8 +30,8 @@
</h4>
</div>
<div class="col-xs-6 text-right">
<a href="{{ route('dashboard.components.groups.edit', [$group->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/components/groups/{{ $group->id }}/delete" class="btn btn-danger confirm-action" data-method="DELETE">{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.components.groups.edit', [$group->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.components.groups.delete', [$group->id], 'delete') }}" class="btn btn-danger confirm-action" data-method="DELETE">{{ trans('forms.delete') }}</a>
</div>
</div>
@empty

View File

@@ -10,7 +10,7 @@
<span class="uppercase">
<i class="ion ion-ios-browsers-outline"></i> {{ trans('dashboard.components.components') }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.components.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.components.create') }}">
{{ trans('dashboard.components.add.title') }}
</a>
<div class="clearfix"></div>
@@ -35,8 +35,8 @@
@endif
</div>
<div class="col-xs-6 text-right">
<a href="/dashboard/components/{{ $component->id }}/edit" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/components/{{ $component->id }}/delete" class="btn btn-danger confirm-action" data-method="DELETE">{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.components.edit', [$component->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.components.delete', [$component->id], 'delete') }}" class="btn btn-danger confirm-action" data-method="DELETE">{{ trans('forms.delete') }}</a>
</div>
</div>
@empty

View File

@@ -128,7 +128,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.incidents.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.incidents') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -94,7 +94,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.incidents.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.incidents') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -10,7 +10,7 @@
<span class="uppercase">
<i class="ion ion-ios-information-outline"></i> {{ trans('dashboard.incidents.incidents') }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.incidents.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.incidents.create') }}">
{{ trans('dashboard.incidents.add.title') }}
</a>
<div class="clearfix"></div>
@@ -30,9 +30,9 @@
@endif
</div>
<div class="col-xs-6 text-right">
<a href="/dashboard/incidents/{{ $incident->id }}/edit" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/incidents/{{ $incident->id }}/update" class="btn btn-info">{{ trans('forms.update') }}</a>
<a href="/dashboard/incidents/{{ $incident->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.incidents.edit', [$incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.incidents.updates', [$incident->id]) }}" class="btn btn-info">{{ trans('forms.update') }}</a>
<a href="{{ cachet_route('dashboard.incidents.delete', [$incident->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@endforeach

View File

@@ -54,7 +54,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.incidents.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.incidents') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -24,7 +24,7 @@
@else
<ul class="list-group components">
<li class="list-group-item">
<a href="{{ route('dashboard.components.add') }}">{{ trans('dashboard.components.add.message') }}</a>
<a href="{{ cachet_route('dashboard.components.create') }}">{{ trans('dashboard.components.add.message') }}</a>
</li>
</ul>
@endif
@@ -36,7 +36,7 @@
<div class="col-sm-12 col-lg-6">
<div class="stats-widget">
<div class="stats-top">
<span class="stats-value"><a href="{{ route('dashboard.incidents.index') }}">{{ $incidents->map(function($incident) { return count($incident); })->sum() }}</a></span>
<span class="stats-value"><a href="{{ cachet_route('dashboard.incidents') }}">{{ $incidents->map(function($incident) { return count($incident); })->sum() }}</a></span>
<span class="stats-label">{{ trans('dashboard.incidents.incidents') }}</span>
</div>
<div class="stats-chart">
@@ -48,7 +48,7 @@
<div class="col-sm-12 col-lg-6">
<div class="stats-widget">
<div class="stats-top">
<span class="stats-value"><a href="{{ route('dashboard.subscribers.index') }}">{{ $subscribers->map(function($subscribers) { return count($subscribers); })->sum() }}</a></span>
<span class="stats-value"><a href="{{ cachet_route('dashboard.subscribers') }}">{{ $subscribers->map(function($subscribers) { return count($subscribers); })->sum() }}</a></span>
<span class="stats-label">{{ trans('dashboard.subscribers.subscribers') }}</span>
</div>
<div class="stats-chart">

View File

@@ -70,7 +70,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.metrics.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.metrics') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -73,7 +73,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.metrics.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.metrics') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -8,7 +8,7 @@
<span class="uppercase">
<i class="ion ion-ios-pie-outline"></i> {{ trans('dashboard.metrics.metrics') }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.metrics.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.metrics.create') }}">
{{ trans('dashboard.metrics.add.title') }}
</a>
<div class="clearfix"></div>
@@ -27,8 +27,8 @@
@endif
</div>
<div class="col-md-6 text-right">
<a href="/dashboard/metrics/{{ $metric->id }}/edit" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/metrics/{{ $metric->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.metrics.edit', [$metric->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.metrics.delete', [$metric->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@empty

View File

@@ -1,69 +1,69 @@
<div class="sidebar">
<div class="sidebar-inner">
<div class="profile">
<a href="{{ route('dashboard.user.user') }}">
<a href="{{ cachet_route('dashboard.user') }}">
<span class="avatar"><img src="{{ $current_user->gravatar }}"></span>
</a>
<a href="{{ route('dashboard.user.user') }}">
<a href="{{ cachet_route('dashboard.user') }}">
<h4 class="username">{{ $current_user->username }}</h4>
</a>
</div>
<div class="clearfix"></div>
<div class="quick-add-incident">
<a class="btn btn-block btn-info" href="{{ route('dashboard.incidents.add') }}">
<a class="btn btn-block btn-info" href="{{ cachet_route('dashboard.incidents.create') }}">
<i class="ion ion-android-checkmark-circle visible-sm"></i>
<span class="hidden-sm">{{ trans('dashboard.incidents.add.title') }}</span>
</a>
</div>
<ul>
<li {!! set_active('dashboard') !!}>
<a href="{{ route('dashboard.index') }}">
<a href="{{ cachet_route('dashboard') }}">
<i class="ion ion-speedometer"></i>
<span>{{ trans('dashboard.dashboard') }}</span>
</a>
</li>
<li {!! set_active('dashboard/incidents*') !!} {!! set_active('dashboard/schedule*') !!}>
<a href="{{ route('dashboard.incidents.index') }}">
<a href="{{ cachet_route('dashboard.incidents') }}">
<i class="ion ion-ios-information-outline"></i>
<span>{{ trans('dashboard.incidents.incidents') }}</span>
<span class="label label-info">{{ $incident_count }}</span>
</a>
</li>
<li {!! set_active('dashboard/templates*') !!}>
<a href="{{ route('dashboard.templates.index') }}">
<a href="{{ cachet_route('dashboard.templates') }}">
<i class="ion ion-ios-paper-outline"></i>
<span>{{ trans('dashboard.incidents.incident-templates') }}</span>
<span class="label label-info">{{ $incident_template_count }}</span>
</a>
</li>
<li {!! set_active('dashboard/components*') !!}>
<a href="{{ route('dashboard.components.index') }}">
<a href="{{ cachet_route('dashboard.components') }}">
<i class="ion ion-ios-browsers-outline"></i>
<span>{{ trans('dashboard.components.components') }}</span>
<span class="label label-info">{{ $component_count }}</span>
</a>
</li>
<li {!! set_active('dashboard/metrics*') !!}>
<a href="{{ route('dashboard.metrics.index') }}">
<a href="{{ cachet_route('dashboard.metrics') }}">
<i class="ion ion-ios-pie-outline"></i>
<span>{{ trans('dashboard.metrics.metrics') }}</span>
</a>
</li>
<li {!! set_active('dashboard/subscribers*') !!}>
<a href="{{ route('dashboard.subscribers.index') }}">
<a href="{{ cachet_route('dashboard.subscribers') }}">
<i class="ion ion-ios-email-outline"></i>
<span>{{ trans('dashboard.subscribers.subscribers') }}</span>
<span class="label label-info">{{ $subscriber_count }}</span>
</a>
</li>
<li {!! set_active('dashboard/team*') !!}>
<a href="{{ route('dashboard.team.index') }}">
<a href="{{ cachet_route('dashboard.team') }}">
<i class="ion ion-ios-people-outline"></i>
<span>{{ trans('dashboard.team.team') }}</span>
</a>
</li>
<li {!! set_active('dashboard/settings*') !!}>
<a href="{{ route('dashboard.settings.setup') }}">
<a href="{{ cachet_route('dashboard.settings.setup') }}">
<i class="ion ion-ios-gear-outline"></i>
<span>
{{ trans('dashboard.settings.settings') }}
@@ -77,10 +77,10 @@
<a href="https://docs.cachethq.io" target="_blank"><i class="ion ion-help"></i></a>
</li>
<li data-toggle="tooltip" data-placement="top" title="{{ trans('dashboard.status_page') }}">
<a href="{{ route('status-page') }}"><i class="ion ion-monitor"></i></a>
<a href="{{ cachet_route('status-page') }}"><i class="ion ion-monitor"></i></a>
</li>
<li data-toggle="tooltip" data-placement="top" title="{{ trans('dashboard.logout') }}">
<a href="{{ route('auth.logout') }}"><i class="ion ion-log-out"></i></a>
<a href="{{ cachet_route('auth.logout') }}"><i class="ion ion-log-out"></i></a>
</li>
</ul>
</div>

View File

@@ -16,19 +16,19 @@
<div class="get-started">
<div class="row">
<div class="col-md-4 animated fadeInDown">
<a href="{{ route('dashboard.components.add') }}">
<a href="{{ cachet_route('dashboard.components.create') }}">
<i class="ion ion-ios-browsers"></i>
{{ trans('dashboard.welcome.steps.component') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown two">
<a href="{{ route('dashboard.incidents.add') }}">
<a href="{{ cachet_route('dashboard.incidents.create') }}">
<i class="ion ion-android-alert"></i>
{{ trans('dashboard.welcome.steps.incident') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown three">
<a href="{{ route('dashboard.settings.theme') }}">
<a href="{{ cachet_route('dashboard.settings.theme') }}">
<i class="ion ion-ios-paper-outline"></i>
{{ trans('dashboard.welcome.steps.customize') }}
</a>
@@ -36,19 +36,19 @@
</div>
<div class="row">
<div class="col-md-4 animated fadeInDown">
<a href="{{ route('dashboard.team.add') }}">
<a href="{{ cachet_route('dashboard.team.create') }}">
<i class="ion ion-ios-people"></i>
{{ trans('dashboard.welcome.steps.team') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown two">
<a href="{{ route('dashboard.user.user') }}">
<a href="{{ cachet_route('dashboard.user') }}">
<i class="ion ion-code-working"></i>
{{ trans('dashboard.welcome.steps.api') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown three">
<a href="{{ route('dashboard.user.user') }}">
<a href="{{ cachet_route('dashboard.user') }}">
<i class="ion ion-unlocked"></i>
{{ trans('dashboard.welcome.steps.two-factor') }}
</a>

View File

@@ -56,7 +56,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.schedule.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.schedule') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -48,7 +48,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.save') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.schedule.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.schedule') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -10,7 +10,7 @@
<span class="uppercase">
<i class="ion ion-android-calendar"></i> {{ trans('dashboard.schedule.schedule') }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.schedule.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.schedule.create') }}">
{{ trans('dashboard.schedule.add.title') }}
</a>
<div class="clearfix"></div>
@@ -32,8 +32,8 @@
@endif
</div>
<div class="col-xs-6 text-right">
<a href="/dashboard/schedule/{{ $incident->id }}/edit" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/schedule/{{ $incident->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.schedule.edit', [$incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.schedule.delete', [$incident->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@endforeach

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST" enctype="multipart/form-data">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings.create', [], 'post') }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST" enctype="multipart/form-data">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST" enctype="multipart/form-data">
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST">
<form name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST">
<form name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<fieldset>

View File

@@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col-sm-12">
<form name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST" enctype="multipart/form-data">
<form name="SettingsForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.settings', [], 'post') }}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@include('dashboard.partials.errors')
<div class="row">

View File

@@ -13,7 +13,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="SubscriberForm" class="form-vertical" role="form" action="/dashboard/subscribers/add" method="POST">
<form name="SubscriberForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.subscribers.create', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -26,7 +26,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.subscribers.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.subscribers') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -9,7 +9,7 @@
<i class="ion ion-ios-email-outline"></i> {{ trans('dashboard.subscribers.subscribers') }}
</span>
@if($current_user->isAdmin && subscribers_enabled())
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.subscribers.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.subscribers.create') }}">
{{ trans('dashboard.subscribers.add.title') }}
</a>
@endif
@@ -43,7 +43,7 @@
@endif
</div>
<div class="col-xs-3 text-right">
<a href="/dashboard/subscribers/{{ $subscriber->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.subscribers.delete', [$subscriber->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@endforeach

View File

@@ -13,7 +13,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="UserForm" class="form-vertical" role="form" action="/dashboard/team/add" method="POST">
<form name="UserForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.team.create', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -43,7 +43,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.add') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.team.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.team') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -43,9 +43,9 @@
<div class="form-group">
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
@if($current_user->isAdmin)
<a class="btn btn-info" href="/dashboard/user/{{ $user->id }}/api/regen">{{ trans('cachet.api.revoke') }}</a>
<a class="btn btn-info" href="{{ cachet_route('dashboard.user.api.regen', [$user->id]) }}">{{ trans('cachet.api.revoke') }}</a>
@if($current_user->id != $user->id)
<a class="btn btn-danger confirm-action" href="/dashboard/team/{{ $user->id }}/delete" data-method="DELETE">{{ trans('forms.delete') }}</a>
<a class="btn btn-danger confirm-action" href="{{ cachet_route('dashboard.team.delete', [$user->id], 'delete') }}" data-method="DELETE">{{ trans('forms.delete') }}</a>
@endif
@endif
</div>

View File

@@ -10,10 +10,10 @@
</span>
@if($current_user->isAdmin)
<div class="button-group pull-right">
<a class="btn btn-sm btn-success" href="{{ route('dashboard.team.invite') }}">
<a class="btn btn-sm btn-success" href="{{ cachet_route('dashboard.team.invite') }}">
{{ trans('dashboard.team.invite.title') }}
</a>
<a class="btn btn-sm btn-success" href="{{ route('dashboard.team.add') }}">
<a class="btn btn-sm btn-success" href="{{ cachet_route('dashboard.team.create') }}">
{{ trans('dashboard.team.add.title') }}
</a>
</div>

View File

@@ -13,7 +13,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="UserForm" class="form-vertical" role="form" action="/dashboard/team/invite" method="POST">
<form name="UserForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.team.invite', [], 'post') }}" method="POST">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset>
<div class="form-group">
@@ -37,7 +37,7 @@
<div class="form-group">
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.invite') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.team.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.team') }}">{{ trans('forms.cancel') }}</a>
</div>
</div>
</form>

View File

@@ -49,7 +49,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.create') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.templates.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.templates') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -58,7 +58,7 @@
<div class="btn-group">
<button type="submit" class="btn btn-success">{{ trans('forms.update') }}</button>
<a class="btn btn-default" href="{{ route('dashboard.templates.index') }}">{{ trans('forms.cancel') }}</a>
<a class="btn btn-default" href="{{ cachet_route('dashboard.templates') }}">{{ trans('forms.cancel') }}</a>
</div>
</form>
</div>

View File

@@ -8,7 +8,7 @@
<span class="uppercase">
<i class="ion ion-ios-paper-outline"></i> {{ trans('dashboard.incidents.templates.title') }}
</span>
<a class="btn btn-md btn-success pull-right" href="{{ route('dashboard.templates.add') }}">
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.templates.create') }}">
{{ trans('dashboard.incidents.templates.add.title') }}
</a>
</div>
@@ -23,8 +23,8 @@
<strong>{{ $template->name }}</strong>
</div>
<div class="col-xs-6 text-right">
<a href="/dashboard/templates/{{ $template->id }}/edit" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="/dashboard/templates/{{ $template->id }}/delete" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.templates.edit', [$template->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.templates.delete', [$template->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
@empty

View File

@@ -13,7 +13,7 @@
<div class="row">
<div class="col-sm-12">
@include('dashboard.partials.errors')
<form name="UserForm" class="form-vertical" role="form" action="/dashboard/user" method="POST">
<form name="UserForm" class="form-vertical" role="form" action="{{ cachet_route('dashboard.user', [], 'post') }}" method="POST">
{!! csrf_field() !!}
<fieldset>
<div class="row">
@@ -39,7 +39,7 @@
<label>{{ trans('forms.user.api-token') }}</label>
<div class="input-group">
<input type="text" class="form-control" name="api_key" disabled value="{{ $current_user->api_key }}" placeholder="{{ trans('forms.user.api-token') }}">
<a href="/dashboard/user/{{ $current_user->id }}/api/regen" class="input-group-addon btn btn-danger">{{ trans('cachet.api.regenerate') }}</a>
<a href="{{ cachet_route('dashboard.user.api.regen', [$current_user->id]) }}" class="input-group-addon btn btn-danger">{{ trans('cachet.api.regenerate') }}</a>
</div>
<span class="help-block">{{ trans('forms.user.api-token-help') }}</span>
</div>

View File

@@ -7,8 +7,8 @@
<meta name="env" content="{{ app('env') }}">
<meta name="token" content="{{ csrf_token() }}">
<link rel="alternate" type="application/atom+xml" href="/atom" title="{{ $site_title }} - Atom Feed">
<link rel="alternate" type="application/rss+xml" href="/rss" title="{{ $site_title }} - RSS Feed">
<link rel="alternate" type="application/atom+xml" href="{{ cachet_route('feed.atom') }}" title="{{ $site_title }} - Atom Feed">
<link rel="alternate" type="application/rss+xml" href="{{ cachet_route('feed.rss') }}" title="{{ $site_title }} - RSS Feed">
<!-- Mobile friendliness -->
<meta name="HandheldFriendly" content="True">

View File

@@ -18,23 +18,23 @@
<ul class="list-inline">
@if($current_user || $dashboard_link)
<li>
<a class="btn btn-link" href="/dashboard">{{ trans('dashboard.dashboard') }}</a>
<a class="btn btn-link" href="{{ cachet_route('dashboard') }}">{{ trans('dashboard.dashboard') }}</a>
</li>
@endif
@if($current_user)
<li>
<a class="btn btn-link" href="{{ route('auth.logout') }}">{{ trans('dashboard.logout') }}</a>
<a class="btn btn-link" href="{{ cachet_route('auth.logout') }}">{{ trans('dashboard.logout') }}</a>
</li>
@endif
<li>
<a class="btn btn-link" href="{{ route('feed.rss') }}">{{ trans('cachet.rss-feed') }}</a>
<a class="btn btn-link" href="{{ cachet_route('feed.rss') }}">{{ trans('cachet.rss-feed') }}</a>
</li>
<li>
<a class="btn btn-link" href="{{ route('feed.atom') }}">{{ trans('cachet.atom-feed') }}</a>
<a class="btn btn-link" href="{{ cachet_route('feed.atom') }}">{{ trans('cachet.atom-feed') }}</a>
</li>
@if(subscribers_enabled())
<li>
<a class="btn btn-success btn-outline" href="{{ route('subscribe.subscribe') }}">{{ trans('cachet.subscriber.button') }}</a>
<a class="btn btn-success btn-outline" href="{{ cachet_route('subscribe') }}">{{ trans('cachet.subscriber.button') }}</a>
</li>
@endif
</ul>

View File

@@ -2,8 +2,8 @@
<div class="panel-heading">
@if($current_user)
<div class="pull-right btn-group">
<a href="{{ route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ route('dashboard.incidents.delete', ['id' => $incident->id]) }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
<a href="{{ cachet_route('dashboard.incidents.edit', ['id' => $incident->id]) }}" class="btn btn-default">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.incidents.delete', ['id' => $incident->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
@endif
@if($incident->component)
@@ -13,7 +13,7 @@
<br>
<small class="date">
@if($with_link)
<a href="{{ route('incident', ['id' => $incident->id]) }}" class="links"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->timestamp_formatted }}" data-timeago="{{ $incident->timestamp_iso }}"></abbr></a>
<a href="{{ cachet_route('incident', ['id' => $incident->id]) }}" class="links"><abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->timestamp_formatted }}" data-timeago="{{ $incident->timestamp_iso }}"></abbr></a>
@else
<abbr class="timeago" data-toggle="tooltip" data-placement="right" title="{{ $incident->timestamp_formatted }}" data-timeago="{{ $incident->timestamp_iso }}"></abbr>
@endif

View File

@@ -1,6 +1,6 @@
<div class="modal fade" tabindex="-1" role="dialog" id="subscribe-modal">
<div class="modal-dialog">
<form action="{{ route("subscribe.subscribe") }}" method="post" class="form">
<form action="{{ cachet_route('subscribe', [], 'post') }}" method="post" class="form">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="modal-content">
<div class="modal-header">
@@ -8,10 +8,10 @@
<h4 class="modal-title">{{ trans("cachet.modal.subscribe.title") }}</h4>
</div>
<div class="modal-body">
<p>{{ trans("cachet.modal.subscribe.body") }}</p>
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="hello@alt-three.com">
</div>
<p>{{ trans("cachet.modal.subscribe.body") }}</p>
<div class="form-group">
<input class="form-control" type="email" name="email" placeholder="hello@alt-three.com">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans("cachet.modal.close") }}</button>

View File

@@ -10,14 +10,14 @@
<ul class="pager">
@if($can_page_backward)
<li class="previous">
<a href="{{ route('status-page') }}?start_date={{ $previous_date }}" class="links">
<a href="{{ cachet_route('status-page') }}?start_date={{ $previous_date }}" class="links">
<span aria-hidden="true">&larr;</span> {{ trans('cachet.incidents.previous_week') }}
</a>
</li>
@endif
@if($can_page_forward)
<li class="next">
<a href="{{ route('status-page') }}?start_date={{ $next_date }}" class="links">
<a href="{{ cachet_route('status-page') }}?start_date={{ $next_date }}" class="links">
{{ trans('cachet.incidents.next_week') }} <span aria-hidden="true">&rarr;</span>
</a>
</li>

View File

@@ -1,12 +1,12 @@
<div class="navbar navbar-custom" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/"><span>{{ $app_name }}</span></a>
<a class="navbar-brand" href="{{ cachet_route('status-page') }}"><span>{{ $app_name }}</span></a>
</div>
<div class="navbar-collapse collapse" id="navbar-menu">
<ul class="nav navbar-nav navbar-right">
<li><a href="/">{{ trans('cachet.home') }}</a></li>
<li><a href="{{ cachet_route('status-page') }}">{{ trans('cachet.home') }}</a></li>
@if($current_user)
<li class="dropdown">
<a href="#" data-toggle="dropdown">
@@ -14,13 +14,13 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu arrow">
<li><a href="{{ route('dashboard.incidents.add') }}">{{ trans('dashboard.incidents.add.title') }}</a></li>
<li><a href="{{ route('dashboard.index') }}">{{ trans('dashboard.dashboard') }}</a></li>
<li><a href="{{ route('auth.logout') }}">{{ trans('dashboard.logout') }}</a></li>
<li><a href="{{ cachet_route('dashboard.incidents.create') }}">{{ trans('dashboard.incidents.add.title') }}</a></li>
<li><a href="{{ cachet_route('dashboard') }}">{{ trans('dashboard.dashboard') }}</a></li>
<li><a href="{{ cachet_route('auth.logout') }}">{{ trans('dashboard.logout') }}</a></li>
</ul>
</li>
@elseif($dashboard_link)
<li><a href="{{ route('dashboard.index') }}">{{ trans('dashboard.dashboard') }}</a></li>
<li><a href="{{ cachet_route('dashboard') }}">{{ trans('dashboard.dashboard') }}</a></li>
@endif
</ul>
</div>

View File

@@ -226,7 +226,7 @@
<h3>
{{ trans("setup.completed") }}
</h3>
<a href="{{ route('dashboard.index') }}" class="btn btn-default">
<a href="{{ cachet_route('dashboard') }}" class="btn btn-default">
<span>{{ trans("setup.finish_setup") }}</span>
</a>
</div>

View File

@@ -2,7 +2,7 @@
@section('content')
<div class="pull-right">
<p><a class="btn btn-success btn-outline" href="/"><i class="ion ion-home"></i></a></p>
<p><a class="btn btn-success btn-outline" href="{{ cachet_route('status-page') }}"><i class="ion ion-home"></i></a></p>
</div>
<div class="clearfix"></div>
@@ -26,7 +26,7 @@
<strong>{{ trans('cachet.signup.title') }}</strong>
</div>
<div class="panel-body">
<form action="{{ route('signup.invite', ['code' => $code]) }}" method="post" class="form">
<form action="{{ cachet_route('signup.invite', ['code' => $code]) }}" method="post" class="form">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<label for="username">{{ trans('cachet.signup.username') }}</label>

View File

@@ -3,7 +3,7 @@
@section('content')
<div class="pull-right">
<p><a class="btn btn-success btn-outline" href="/"><i class="ion ion-home"></i></a></p>
<p><a class="btn btn-success btn-outline" href="{{ cachet_route('status-page') }}"><i class="ion ion-home"></i></a></p>
</div>
<div class="clearfix"></div>
@@ -18,7 +18,7 @@
Manage notifications for {{ $subscriber->email }}
</p>
</div>
<form action="{{ route('subscribe.manage', $subscriber->verify_code) }}" method="post">
<form action="{{ cachet_route('subscribe.manage', [$subscriber->verify_code], 'post') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
@if(!$component_groups->isEmpty() || !$ungrouped_components->isEmpty())
@if($component_groups->count() > 0)
@@ -29,9 +29,9 @@
<i class="{{ $componentGroup->collapse_class_with_subscriptions($subscriptions) }} group-toggle"></i>
<strong>{{ $componentGroup->name }}</strong>
<div class="pull-right text-muted small">
<a href="#" class="select-group" id="select-all-{{$componentGroup->id}}">Select All</a>
<a href="javascript: void(0);" class="select-group" id="select-all-{{$componentGroup->id}}">Select All</a>
&nbsp;|&nbsp;
<a href="#" class="deselect-group" id="deselect-all-{{$componentGroup->id}}">Deselect All</a>
<a href="javascript: void(0);" class="deselect-group" id="deselect-all-{{$componentGroup->id}}">Deselect All</a>
</div>
</div>
<div class="form-group group-items {{ $componentGroup->has_subscriber($subscriptions) ? null : "hide" }}">

View File

@@ -2,7 +2,7 @@
@section('content')
<div class="pull-right">
<p><a class="btn btn-success btn-outline" href="/"><i class="ion ion-home"></i></a></p>
<p><a class="btn btn-success btn-outline" href="{{ cachet_route('status-page') }}"><i class="ion ion-home"></i></a></p>
</div>
<div class="clearfix"></div>
@@ -14,7 +14,7 @@
<div class="panel panel-default">
<div class="panel-heading">{{ trans('cachet.subscriber.subscribe') }}</div>
<div class="panel-body">
<form action="{{ route('subscribe.subscribe', [], false) }}" method="POST" class="form">
<form action="{{ cachet_route('subscribe', [], 'post') }}" method="POST" class="form">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<input class="form-control" type="email" name="email">