group(function () { Route::resource('country', 'CountryResourceController'); }); 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', 'CountryResourceController'); }); // Public routes for pages Route::get('locations/', 'CountryPublicController@index'); Route::get('locations/{slug?}', 'CountryPublicController@show'); } ); } // web routes for city Route::prefix('{guard}/location')->group(function () { Route::resource('city', 'CityResourceController'); }); 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', 'CityResourceController'); }); // Public routes for pages Route::get('locations/', 'CityPublicController@index'); Route::get('locations/{slug?}', 'CityPublicController@show'); } ); } // web routes for location Route::prefix('{guard}/location')->group(function () { Route::resource('location', 'LocationResourceController'); }); 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', 'LocationResourceController'); }); // Public routes for pages Route::get('locations/', 'LocationPublicController@index'); Route::get('locations/{slug?}', 'LocationPublicController@show'); } ); } // web routes for properties Route::prefix('{guard}/location')->group(function () { Route::resource('properties', 'PropertiesResourceController'); }); 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', 'PropertiesResourceController'); }); // Public routes for pages Route::get('locations/', 'PropertiesPublicController@index'); Route::get('locations/{slug?}', 'PropertiesPublicController@show'); } ); } // web routes for sublocation Route::prefix('{guard}/location')->group(function () { Route::resource('sublocation', 'SublocationResourceController'); }); 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', 'SublocationResourceController'); }); // Public routes for pages Route::get('locations/', 'SublocationPublicController@index'); Route::get('locations/{slug?}', 'SublocationPublicController@show'); } ); }