group(function () { Route::get('name/form/{element}', 'NameAPIController@form'); Route::resource('name', 'NameAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for amls Route::prefix('{guard}/aml')->group(function () { Route::get('name/form/{element}', 'NameAPIController@form'); Route::apiResource('name', 'NameAPIController'); }); // Public routes for amls Route::get('aml/Name', 'NamePublicController@getName'); } ); } // API routes for nationality Route::prefix('{guard}/aml')->group(function () { Route::get('nationality/form/{element}', 'NationalityAPIController@form'); Route::resource('nationality', 'NationalityAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for amls Route::prefix('{guard}/aml')->group(function () { Route::get('nationality/form/{element}', 'NationalityAPIController@form'); Route::apiResource('nationality', 'NationalityAPIController'); }); // Public routes for amls Route::get('aml/Nationality', 'NationalityPublicController@getNationality'); } ); } // API routes for sanction Route::prefix('{guard}/aml')->group(function () { Route::get('sanction/form/{element}', 'SanctionAPIController@form'); Route::resource('sanction', 'SanctionAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for amls Route::prefix('{guard}/aml')->group(function () { Route::get('sanction/form/{element}', 'SanctionAPIController@form'); Route::apiResource('sanction', 'SanctionAPIController'); }); // Public routes for amls Route::get('aml/Sanction', 'SanctionPublicController@getSanction'); } ); }