group(function () { Route::resource('asset_maintenance', 'AssetMaintenanceResourceController'); }); // Public routes for asset_maintenance Route::get('asset_maintenances/', 'AssetMaintenancePublicController@index'); Route::get('asset_maintenances/{slug?}', 'AssetMaintenancePublicController@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', 'AssetMaintenanceResourceController'); }); // Public routes for pages Route::get('asset_maintenances/', 'AssetMaintenancePublicController@index'); Route::get('asset_maintenances/{slug?}', 'AssetMaintenancePublicController@show'); } ); }