group(function () { Route::resource('property', 'PropertyResourceController'); }); // Public routes for property Route::get('realestates/', 'PropertyPublicController@index'); Route::get('realestates/{slug?}', 'PropertyPublicController@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', 'PropertyResourceController'); }); // Public routes for pages Route::get('realestates/', 'PropertyPublicController@index'); Route::get('realestates/{slug?}', 'PropertyPublicController@show'); } ); } // web routes for property_category Route::prefix('{guard}/realestate')->group(function () { Route::resource('property_category', 'PropertyCategoryResourceController'); }); // Public routes for property_category Route::get('realestates/', 'PropertyCategoryPublicController@index'); Route::get('realestates/{slug?}', 'PropertyCategoryPublicController@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', 'PropertyCategoryResourceController'); }); // Public routes for pages Route::get('realestates/', 'PropertyCategoryPublicController@index'); Route::get('realestates/{slug?}', 'PropertyCategoryPublicController@show'); } ); }