Split setup routes and retur inline groups

This commit is contained in:
Joseph Cohen
2015-01-05 14:21:06 -06:00
parent 3b70060d09
commit 302d59f215
5 changed files with 41 additions and 53 deletions
+7 -5
View File
@@ -1,19 +1,21 @@
<?php
Route::api([
'after' => 'allowed_domains',
'namespace' => 'CachetHQ\Cachet\Http\Controllers\Api',
'version' => 'v1',
], function () {
Route::api(['after' => 'allowed_domains', 'namespace' => 'CachetHQ\Cachet\Http\Controllers\Api', 'version' => 'v1'], function () {
// Components
Route::get('components', 'ComponentController@getComponents');
Route::get('components/{id}', 'ComponentController@getComponent');
Route::get('components/{id}/incidents', 'ComponentController@getComponentIncidents');
// Incidents
Route::get('incidents', 'IncidentController@getIncidents');
Route::get('incidents/{id}', 'IncidentController@getIncident');
// Metrics
Route::get('metrics', 'MetricController@getMetrics');
Route::get('metrics/{id}', 'MetricController@getMetric');
Route::get('metrics/points/{id}', 'MetricPointController@getMetricPoint');
// Api protected
Route::group(['protected' => true], function () {
Route::post('components', 'ComponentController@postComponents');
Route::post('incidents', 'IncidentController@postIncidents');