group(function () { Route::get('checklist/form/{element}', 'ChecklistAPIController@form'); Route::resource('checklist', 'ChecklistAPIController'); }); // Public routes for checklist Route::get('checklists/', 'ChecklistPublicController@index'); Route::get('checklists/{slug?}', 'ChecklistPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for checklists Route::prefix('{guard}/checklist')->group(function () { Route::get('checklist/form/{element}', 'ChecklistAPIController@form'); Route::apiResource('checklist', 'ChecklistAPIController'); }); // Public routes for checklists Route::get('checklist/Checklist', 'ChecklistPublicController@getChecklist'); } ); } // API routes for asset Route::prefix('{guard}/checklist')->group(function () { Route::get('asset/form/{element}', 'AssetAPIController@form'); Route::resource('asset', 'AssetAPIController'); }); // Public routes for asset Route::get('checklists/', 'AssetPublicController@index'); Route::get('checklists/{slug?}', 'AssetPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for checklists Route::prefix('{guard}/checklist')->group(function () { Route::get('asset/form/{element}', 'AssetAPIController@form'); Route::apiResource('asset', 'AssetAPIController'); }); // Public routes for checklists Route::get('checklist/Asset', 'AssetPublicController@getAsset'); } ); } // API routes for plan Route::prefix('{guard}/checklist')->group(function () { Route::get('plan/form/{element}', 'PlanAPIController@form'); Route::resource('plan', 'PlanAPIController'); }); // Public routes for plan Route::get('checklists/', 'PlanPublicController@index'); Route::get('checklists/{slug?}', 'PlanPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for checklists Route::prefix('{guard}/checklist')->group(function () { Route::get('plan/form/{element}', 'PlanAPIController@form'); Route::apiResource('plan', 'PlanAPIController'); }); // Public routes for checklists Route::get('checklist/Plan', 'PlanPublicController@getPlan'); } ); }