group(function () { Route::resource('checklist', 'ChecklistResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'ChecklistResourceController'); }); // Public routes for pages Route::get('checklists/', 'ChecklistPublicController@index'); Route::get('checklists/{slug?}', 'ChecklistPublicController@show'); } ); } // web routes for asset Route::prefix('{guard}/checklist')->group(function () { Route::resource('asset', 'AssetResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'AssetResourceController'); }); // Public routes for pages Route::get('checklists/', 'AssetPublicController@index'); Route::get('checklists/{slug?}', 'AssetPublicController@show'); } ); } // web routes for plan Route::prefix('{guard}/checklist')->group(function () { Route::resource('plan', 'PlanResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PlanResourceController'); }); // Public routes for pages Route::get('checklists/', 'PlanPublicController@index'); Route::get('checklists/{slug?}', 'PlanPublicController@show'); } ); }