@@ -138,13 +138,13 @@ public function createIncidentAction()
138
138
null
139
139
));
140
140
} catch (ValidationException $ e ) {
141
- return cachet_route ('dashboard.incidents.create ' )
141
+ return cachet_redirect ('dashboard.incidents.create ' )
142
142
->withInput (Binput::all ())
143
143
->withTitle (sprintf ('%s %s ' , trans ('dashboard.notifications.whoops ' ), trans ('dashboard.incidents.add.failure ' )))
144
144
->withErrors ($ e ->getMessageBag ());
145
145
}
146
146
147
- return cachet_route ('dashboard.incidents ' )
147
+ return cachet_redirect ('dashboard.incidents ' )
148
148
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.add.success ' )));
149
149
}
150
150
@@ -184,7 +184,7 @@ public function deleteTemplateAction(IncidentTemplate $template)
184
184
{
185
185
$ template ->delete ();
186
186
187
- return cachet_route ('dashboard.templates ' )
187
+ return cachet_redirect ('dashboard.templates ' )
188
188
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.templates.delete.success ' )));
189
189
}
190
190
@@ -198,13 +198,13 @@ public function createIncidentTemplateAction()
198
198
try {
199
199
IncidentTemplate::create (Binput::get ('template ' ));
200
200
} catch (ValidationException $ e ) {
201
- return cachet_route ('dashboard.templates.create ' )
201
+ return cachet_redirect ('dashboard.templates.create ' )
202
202
->withInput (Binput::all ())
203
203
->withTitle (sprintf ('%s %s ' , trans ('dashboard.notifications.whoops ' ), trans ('dashboard.incidents.templates.add.failure ' )))
204
204
->withErrors ($ e ->getMessageBag ());
205
205
}
206
206
207
- return cachet_route ('dashboard.templates ' )
207
+ return cachet_redirect ('dashboard.templates ' )
208
208
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.templates.add.success ' )));
209
209
}
210
210
@@ -219,7 +219,7 @@ public function deleteIncidentAction(Incident $incident)
219
219
{
220
220
dispatch (new RemoveIncidentCommand ($ incident ));
221
221
222
- return cachet_route ('dashboard.incidents ' )
222
+ return cachet_redirect ('dashboard.incidents ' )
223
223
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.delete.success ' )));
224
224
}
225
225
@@ -264,7 +264,7 @@ public function editIncidentAction(Incident $incident)
264
264
null
265
265
));
266
266
} catch (ValidationException $ e ) {
267
- return cachet_route ('dashboard.incidents.edit ' , ['id ' => $ incident ->id ])
267
+ return cachet_redirect ('dashboard.incidents.edit ' , ['id ' => $ incident ->id ])
268
268
->withInput (Binput::all ())
269
269
->withTitle (sprintf ('%s %s ' , trans ('dashboard.notifications.whoops ' ), trans ('dashboard.incidents.templates.edit.failure ' )))
270
270
->withErrors ($ e ->getMessageBag ());
@@ -274,7 +274,7 @@ public function editIncidentAction(Incident $incident)
274
274
$ incident ->component ->update (['status ' => Binput::get ('component_status ' )]);
275
275
}
276
276
277
- return cachet_route ('dashboard.incidents.edit ' , ['id ' => $ incident ->id ])
277
+ return cachet_redirect ('dashboard.incidents.edit ' , ['id ' => $ incident ->id ])
278
278
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.edit.success ' )));
279
279
}
280
280
@@ -290,12 +290,12 @@ public function editTemplateAction(IncidentTemplate $template)
290
290
try {
291
291
$ template ->update (Binput::get ('template ' ));
292
292
} catch (ValidationException $ e ) {
293
- return cachet_route ('dashboard.templates.edit ' , ['id ' => $ template ->id ])
293
+ return cachet_redirect ('dashboard.templates.edit ' , ['id ' => $ template ->id ])
294
294
->withUpdatedTemplate ($ template )
295
295
->withTemplateErrors ($ e ->getMessageBag ()->getErrors ());
296
296
}
297
297
298
- return cachet_route ('dashboard.templates.edit ' , ['id ' => $ template ->id ])
298
+ return cachet_redirect ('dashboard.templates.edit ' , ['id ' => $ template ->id ])
299
299
->withUpdatedTemplate ($ template );
300
300
}
301
301
@@ -328,13 +328,13 @@ public function createIncidentUpdateAction(Incident $incident)
328
328
$ this ->auth ->user ()
329
329
));
330
330
} catch (ValidationException $ e ) {
331
- return cachet_route ('dashboard.incidents.update ' , ['id ' => $ incident ->id ])
331
+ return cachet_redirect ('dashboard.incidents.update ' , ['id ' => $ incident ->id ])
332
332
->withInput (Binput::all ())
333
333
->withTitle (sprintf ('%s %s ' , trans ('dashboard.notifications.whoops ' ), trans ('dashboard.incidents.templates.edit.failure ' )))
334
334
->withErrors ($ e ->getMessageBag ());
335
335
}
336
336
337
- return cachet_route ('dashboard.incidents ' )
337
+ return cachet_redirect ('dashboard.incidents ' )
338
338
->withSuccess (sprintf ('%s %s ' , trans ('dashboard.notifications.awesome ' ), trans ('dashboard.incidents.delete.success ' )));
339
339
}
340
340
}
0 commit comments