group(function () { Route::get('comment/form/{element}', 'CommentAPIController@form'); Route::resource('comment', 'CommentAPIController'); }); // Public routes for comment Route::get('pms/', 'CommentPublicController@index'); Route::get('pms/{slug?}', 'CommentPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('comment/form/{element}', 'CommentAPIController@form'); Route::apiResource('comment', 'CommentAPIController'); }); // Public routes for pms Route::get('pm/Comment', 'CommentPublicController@getComment'); } ); } // API routes for page Route::prefix('{guard}/pm')->group(function () { Route::get('page/form/{element}', 'PageAPIController@form'); Route::resource('page', 'PageAPIController'); }); // Public routes for page Route::get('pms/', 'PagePublicController@index'); Route::get('pms/{slug?}', 'PagePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('page/form/{element}', 'PageAPIController@form'); Route::apiResource('page', 'PageAPIController'); }); // Public routes for pms Route::get('pm/Page', 'PagePublicController@getPage'); } ); } // API routes for project Route::prefix('{guard}/pm')->group(function () { Route::get('project/form/{element}', 'ProjectAPIController@form'); Route::resource('project', 'ProjectAPIController'); }); // Public routes for project Route::get('pms/', 'ProjectPublicController@index'); Route::get('pms/{slug?}', 'ProjectPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('project/form/{element}', 'ProjectAPIController@form'); Route::apiResource('project', 'ProjectAPIController'); }); // Public routes for pms Route::get('pm/Project', 'ProjectPublicController@getProject'); } ); } // API routes for roadmap Route::prefix('{guard}/pm')->group(function () { Route::get('roadmap/form/{element}', 'RoadmapAPIController@form'); Route::resource('roadmap', 'RoadmapAPIController'); }); // Public routes for roadmap Route::get('pms/', 'RoadmapPublicController@index'); Route::get('pms/{slug?}', 'RoadmapPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('roadmap/form/{element}', 'RoadmapAPIController@form'); Route::apiResource('roadmap', 'RoadmapAPIController'); }); // Public routes for pms Route::get('pm/Roadmap', 'RoadmapPublicController@getRoadmap'); } ); } // API routes for sprint Route::prefix('{guard}/pm')->group(function () { Route::get('sprint/form/{element}', 'SprintAPIController@form'); Route::resource('sprint', 'SprintAPIController'); }); // Public routes for sprint Route::get('pms/', 'SprintPublicController@index'); Route::get('pms/{slug?}', 'SprintPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('sprint/form/{element}', 'SprintAPIController@form'); Route::apiResource('sprint', 'SprintAPIController'); }); // Public routes for pms Route::get('pm/Sprint', 'SprintPublicController@getSprint'); } ); } // API routes for worklog Route::prefix('{guard}/pm')->group(function () { Route::get('worklog/form/{element}', 'WorklogAPIController@form'); Route::resource('worklog', 'WorklogAPIController'); }); // Public routes for worklog Route::get('pms/', 'WorklogPublicController@index'); Route::get('pms/{slug?}', 'WorklogPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pms Route::prefix('{guard}/pm')->group(function () { Route::get('worklog/form/{element}', 'WorklogAPIController@form'); Route::apiResource('worklog', 'WorklogAPIController'); }); // Public routes for pms Route::get('pm/Worklog', 'WorklogPublicController@getWorklog'); } ); }