Skip to content

Commit dcd8e80

Browse files
committed
Moved statuslabels API for route priority
1 parent 9c637ba commit dcd8e80

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

routes/api.php

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -366,23 +366,17 @@
366366

367367
/*--- Status Labels API ---*/
368368

369-
Route::resource('statuslabels', 'StatuslabelsController',
370-
[
371-
'names' =>
372-
[
373-
'index' => 'api.statuslabels.index',
374-
'store' => 'api.statuslabels.store',
375-
'show' => 'api.statuslabels.show',
376-
'update' => 'api.statuslabels.update',
377-
'destroy' => 'api.statuslabels.destroy'
378-
],
379-
'except' => ['create', 'edit'],
380-
'parameters' => ['statuslabel' => 'statuslabel_id']
381-
]
382-
);
383369

384370
Route::group(['prefix' => 'statuslabels'], function () {
385371

372+
// Pie chart for dashboard
373+
Route::get('assets',
374+
[
375+
'as' => 'api.statuslabels.assets.bytype',
376+
'uses' => 'StatuslabelsController@getAssetCountByStatuslabel'
377+
]
378+
);
379+
386380
Route::get('{statuslabel}/assetlist',
387381
[
388382
'as' => 'api.statuslabels.assets',
@@ -397,14 +391,25 @@
397391
]
398392
);
399393

400-
// Pie chart for dashboard
401-
Route::get('assets',
402-
[
403-
'as' => 'api.statuslabels.assets.bytype',
404-
'uses' => 'StatuslabelsController@getAssetCountByStatuslabel'
405-
]
406-
);
407-
}); // Status labels group
394+
395+
});
396+
397+
Route::resource('statuslabels', 'StatuslabelsController',
398+
[
399+
'names' =>
400+
[
401+
'index' => 'api.statuslabels.index',
402+
'store' => 'api.statuslabels.store',
403+
'show' => 'api.statuslabels.show',
404+
'update' => 'api.statuslabels.update',
405+
'destroy' => 'api.statuslabels.destroy'
406+
],
407+
'except' => ['create', 'edit'],
408+
'parameters' => ['statuslabel' => 'statuslabel_id']
409+
]
410+
);
411+
412+
// Status labels group
408413

409414

410415
/*--- Suppliers API ---*/

0 commit comments

Comments
 (0)