group(function () { Route::resource('name', 'NameResourceController'); }); 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', 'NameResourceController'); }); // Public routes for pages Route::get('amls/', 'NamePublicController@index'); Route::get('amls/{slug?}', 'NamePublicController@show'); } ); } // web routes for nationality Route::prefix('{guard}/aml')->group(function () { Route::resource('nationality', 'NationalityResourceController'); }); 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', 'NationalityResourceController'); }); // Public routes for pages Route::get('amls/', 'NationalityPublicController@index'); Route::get('amls/{slug?}', 'NationalityPublicController@show'); } ); } // web routes for sanction Route::prefix('{guard}/aml')->group(function () { Route::resource('sanction', 'SanctionResourceController'); }); 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', 'SanctionResourceController'); }); // Public routes for pages Route::get('amls/', 'SanctionPublicController@index'); Route::get('amls/{slug?}', 'SanctionPublicController@show'); } ); }