|
|
@ -12,6 +12,7 @@ $router->group(['prefix' => 'actions'], function () use ($router) { |
|
|
|
|
|
|
|
$router->get('/callback', 'CreditController@callback'); |
|
|
|
$router->get('/{transaction}/redirection', 'CreditController@redirection'); |
|
|
|
$router->post('/log', 'ActivityController@store'); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'auth'], function () use ($router) { |
|
|
|
$router->get('/', 'AuthController@auth'); |
|
|
@ -37,6 +38,9 @@ $router->group(['prefix' => 'businesses'], function () use ($router) { |
|
|
|
|
|
|
|
$router->group(['prefix' => '{business}', 'middleware' => 'bindBusiness'], function () use ($router) { |
|
|
|
|
|
|
|
$router->get('/tasks', 'TaskController@index'); |
|
|
|
$router->get('/works', 'WorkController@index'); |
|
|
|
$router->get('statistics', 'StatisticController@index'); |
|
|
|
|
|
|
|
$router->put('/avatar', 'BusinessController@setAvatar'); |
|
|
|
$router->delete('/avatar', 'BusinessController@unSetAvatar'); |
|
|
@ -61,6 +65,7 @@ $router->group(['prefix' => 'businesses'], function () use ($router) { |
|
|
|
|
|
|
|
$router->put('/avatar', 'ProjectController@setAvatar'); |
|
|
|
$router->delete('/avatar', 'ProjectController@unSetAvatar'); |
|
|
|
$router->get('/statistics', 'StatisticController@index'); |
|
|
|
|
|
|
|
$router->get('/', 'ProjectController@show'); |
|
|
|
$router->put('/', 'ProjectController@update'); |
|
|
@ -109,6 +114,37 @@ $router->group(['prefix' => 'businesses'], function () use ($router) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'tasks'], function ($router) { |
|
|
|
$router->post('/', 'TaskController@store'); |
|
|
|
$router->group(['prefix' => '{task}'], function ($router) { |
|
|
|
$router->get('/', 'TaskController@show'); |
|
|
|
$router->put('/', 'TaskController@update'); |
|
|
|
$router->delete('/', 'TaskController@destroy'); |
|
|
|
|
|
|
|
$router->post('/watchers', 'TaskController@toggleWatcher'); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'works'], function ($router) { |
|
|
|
$router->post('/', 'WorkController@store'); |
|
|
|
$router->group(['prefix' => '{work}'], function ($router) { |
|
|
|
$router->get('/', 'WorkController@show'); |
|
|
|
$router->put('/', 'WorkController@update'); |
|
|
|
$router->delete('/', 'WorkController@destroy'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'comments'], function ($router) { |
|
|
|
$router->get('/', 'CommentController@index'); |
|
|
|
$router->post('/', 'CommentController@store'); |
|
|
|
$router->group(['prefix' => '{comment}'], function ($router) { |
|
|
|
$router->get('/', 'CommentController@show'); |
|
|
|
$router->put('/', 'CommentController@update'); |
|
|
|
$router->delete('/', 'CommentController@destroy'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
@ -161,45 +197,3 @@ $router->group(['prefix' => 'users'], function () use ($router) { |
|
|
|
$router->delete('/avatar', 'UserController@unSetAvatar'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$router->group([], function () use ($router) { |
|
|
|
$router->post('/log', 'ActivityController@store'); |
|
|
|
$router->group(['prefix' => 'businesses/{business}', 'middleware' => ['auth', 'bindBusiness']], function ($router) { |
|
|
|
$router->get('/tasks', 'TaskController@index'); |
|
|
|
$router->get('/works', 'WorkController@index'); |
|
|
|
$router->get('statistics', 'StatisticController@index'); |
|
|
|
$router->get('projects/{project}/statistics', 'StatisticController@index'); |
|
|
|
$router->get('/tasks/{task}', 'TaskController@show'); |
|
|
|
$router->group(['prefix' => 'projects/{project}/tasks'], function ($router) { |
|
|
|
$router->post('/', 'TaskController@store'); |
|
|
|
|
|
|
|
$router->group(['prefix' => '{task}'], function ($router) { |
|
|
|
$router->get('/', 'TaskController@show'); |
|
|
|
$router->put('/', 'TaskController@update'); |
|
|
|
$router->delete('/', 'TaskController@destroy'); |
|
|
|
|
|
|
|
$router->post('/watchers', 'TaskController@toggleWatcher'); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'works'], function ($router) { |
|
|
|
$router->post('/', 'WorkController@store'); |
|
|
|
$router->group(['prefix' => '{work}'], function ($router) { |
|
|
|
$router->get('/', 'WorkController@show'); |
|
|
|
$router->put('/', 'WorkController@update'); |
|
|
|
$router->delete('/', 'WorkController@destroy'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
$router->group(['prefix' => 'comments'], function ($router) { |
|
|
|
$router->get('/', 'CommentController@index'); |
|
|
|
$router->post('/', 'CommentController@store'); |
|
|
|
$router->group(['prefix' => '{comment}'], function ($router) { |
|
|
|
$router->get('/', 'CommentController@show'); |
|
|
|
$router->put('/', 'CommentController@update'); |
|
|
|
$router->delete('/', 'CommentController@destroy'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |