Typehint all of the routers
This commit is contained in:
@@ -29,8 +29,8 @@ class ApiRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => ['api']], function ($router) {
|
||||
$router->group(['middleware' => ['auth.api']], function ($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');
|
||||
|
||||
@@ -47,7 +47,7 @@ class ApiRoutes
|
||||
$router->get('metrics/{metric}/points', 'MetricController@getMetricPoints');
|
||||
});
|
||||
|
||||
$router->group(['middleware' => ['auth.api:true']], function ($router) {
|
||||
$router->group(['middleware' => ['auth.api:true']], function (Registrar $router) {
|
||||
$router->get('subscribers', 'SubscriberController@getSubscribers');
|
||||
|
||||
$router->post('components', 'ComponentController@postComponents');
|
||||
|
||||
@@ -29,7 +29,7 @@ class AuthRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['as' => 'auth.', 'middleware' => ['web', 'ready'], 'prefix' => 'auth'], function ($router) {
|
||||
$router->group(['as' => 'auth.', 'middleware' => ['web', 'ready'], 'prefix' => 'auth'], function (Registrar $router) {
|
||||
$router->get('login', [
|
||||
'middleware' => 'guest',
|
||||
'as' => 'login',
|
||||
|
||||
@@ -29,13 +29,13 @@ class DashboardRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'auth'], 'prefix' => 'dashboard', 'namespace' => 'Dashboard', 'as' => 'dashboard.'], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'auth'], 'prefix' => 'dashboard', 'namespace' => 'Dashboard', 'as' => 'dashboard.'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'DashboardController@showDashboard',
|
||||
]);
|
||||
|
||||
$router->group(['as' => 'components.', 'prefix' => 'components'], function ($router) {
|
||||
$router->group(['as' => 'components.', 'prefix' => 'components'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'ComponentController@showComponents',
|
||||
@@ -68,7 +68,7 @@ class DashboardRoutes
|
||||
$router->post('{component}/edit', 'ComponentController@updateComponentAction');
|
||||
});
|
||||
|
||||
$router->group(['as' => 'incidents.', 'prefix' => 'incidents'], function ($router) {
|
||||
$router->group(['as' => 'incidents.', 'prefix' => 'incidents'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'IncidentController@showIncidents',
|
||||
@@ -89,7 +89,7 @@ class DashboardRoutes
|
||||
$router->post('{incident}/edit', 'IncidentController@editIncidentAction');
|
||||
});
|
||||
|
||||
$router->group(['as' => 'schedule.', 'prefix' => 'schedule'], function ($router) {
|
||||
$router->group(['as' => 'schedule.', 'prefix' => 'schedule'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'ScheduleController@showIndex',
|
||||
@@ -110,7 +110,7 @@ class DashboardRoutes
|
||||
]);
|
||||
});
|
||||
|
||||
$router->group(['as' => 'templates.', 'prefix' => 'templates'], function ($router) {
|
||||
$router->group(['as' => 'templates.', 'prefix' => 'templates'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'IncidentController@showTemplates',
|
||||
@@ -128,7 +128,7 @@ class DashboardRoutes
|
||||
$router->delete('{incident_template}/delete', 'IncidentController@deleteTemplateAction');
|
||||
});
|
||||
|
||||
$router->group(['as' => 'subscribers.', 'prefix' => 'subscribers'], function ($router) {
|
||||
$router->group(['as' => 'subscribers.', 'prefix' => 'subscribers'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'SubscriberController@showSubscribers',
|
||||
@@ -141,7 +141,7 @@ class DashboardRoutes
|
||||
$router->delete('{subscriber}/delete', 'SubscriberController@deleteSubscriberAction');
|
||||
});
|
||||
|
||||
$router->group(['as' => 'metrics.', 'prefix' => 'metrics'], function ($router) {
|
||||
$router->group(['as' => 'metrics.', 'prefix' => 'metrics'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'MetricController@showMetrics',
|
||||
@@ -159,13 +159,13 @@ class DashboardRoutes
|
||||
$router->post('{metric}/edit', 'MetricController@editMetricAction');
|
||||
});
|
||||
|
||||
$router->group(['as' => 'team.', 'prefix' => 'team'], function ($router) {
|
||||
$router->group(['as' => 'team.', 'prefix' => 'team'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'index',
|
||||
'uses' => 'TeamController@showTeamView',
|
||||
]);
|
||||
|
||||
$router->group(['middleware' => 'admin'], function ($router) {
|
||||
$router->group(['middleware' => 'admin'], function (Registrar $router) {
|
||||
$router->get('add', [
|
||||
'as' => 'add',
|
||||
'uses' => 'TeamController@showAddTeamMemberView',
|
||||
@@ -182,7 +182,7 @@ class DashboardRoutes
|
||||
});
|
||||
});
|
||||
|
||||
$router->group(['as' => 'settings.', 'prefix' => 'settings'], function ($router) {
|
||||
$router->group(['as' => 'settings.', 'prefix' => 'settings'], function (Registrar $router) {
|
||||
$router->get('setup', [
|
||||
'as' => 'setup',
|
||||
'uses' => 'SettingsController@showSetupView',
|
||||
@@ -210,7 +210,7 @@ class DashboardRoutes
|
||||
$router->post('/', 'SettingsController@postSettings');
|
||||
});
|
||||
|
||||
$router->group(['prefix' => 'user'], function ($router) {
|
||||
$router->group(['prefix' => 'user'], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'user',
|
||||
'uses' => 'UserController@showUser',
|
||||
@@ -219,7 +219,7 @@ class DashboardRoutes
|
||||
$router->get('{user}/api/regen', 'UserController@regenerateApiKey');
|
||||
});
|
||||
|
||||
$router->group(['prefix' => 'api'], function ($router) {
|
||||
$router->group(['prefix' => 'api'], function (Registrar $router) {
|
||||
$router->get('incidents/templates', 'ApiController@getIncidentTemplate');
|
||||
$router->post('components/groups/order', 'ApiController@postUpdateComponentGroupOrder');
|
||||
$router->post('components/order', 'ApiController@postUpdateComponentOrder');
|
||||
|
||||
@@ -29,7 +29,7 @@ class FeedRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'ready']], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'ready']], function (Registrar $router) {
|
||||
$router->get('/atom/{component_group?}', [
|
||||
'as' => 'feed.atom',
|
||||
'uses' => 'FeedController@atomAction',
|
||||
|
||||
@@ -29,7 +29,7 @@ class SetupRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'setup']], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'setup']], function (Registrar $router) {
|
||||
$router->controller('setup', 'SetupController');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class SignupRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function (Registrar $router) {
|
||||
$router->get('signup/invite/{code}', [
|
||||
'as' => 'invite',
|
||||
'uses' => 'SignupController@getSignup',
|
||||
|
||||
@@ -29,7 +29,7 @@ class StatusPageRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'ready', 'localize']], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'ready', 'localize']], function (Registrar $router) {
|
||||
$router->get('/', [
|
||||
'as' => 'status-page',
|
||||
'uses' => 'StatusPageController@showIndex',
|
||||
|
||||
@@ -29,7 +29,7 @@ class SubscribeRoutes
|
||||
*/
|
||||
public function map(Registrar $router)
|
||||
{
|
||||
$router->group(['middleware' => ['web', 'ready', 'localize', 'subscribers'], 'as' => 'subscribe.'], function ($router) {
|
||||
$router->group(['middleware' => ['web', 'ready', 'localize', 'subscribers'], 'as' => 'subscribe.'], function (Registrar $router) {
|
||||
$router->get('subscribe', [
|
||||
'as' => 'subscribe',
|
||||
'uses' => 'SubscribeController@showSubscribe',
|
||||
|
||||
Reference in New Issue
Block a user