group(function () { Route::get('category/form/{element}', 'CategoryAPIController@form'); Route::resource('category', 'CategoryAPIController'); }); // Public routes for category Route::get('properties/', 'CategoryPublicController@index'); Route::get('properties/{slug?}', 'CategoryPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for properties Route::prefix('{guard}/property')->group(function () { Route::get('category/form/{element}', 'CategoryAPIController@form'); Route::apiResource('category', 'CategoryAPIController'); }); // Public routes for properties Route::get('property/Category', 'CategoryPublicController@getCategory'); } ); } // API routes for property Route::prefix('{guard}/property')->group(function () { Route::get('property/form/{element}', 'PropertyAPIController@form'); Route::resource('property', 'PropertyAPIController'); }); // Public routes for property Route::get('properties/', 'PropertyPublicController@index'); Route::get('properties/{slug?}', 'PropertyPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for properties Route::prefix('{guard}/property')->group(function () { Route::get('property/form/{element}', 'PropertyAPIController@form'); Route::apiResource('property', 'PropertyAPIController'); }); // Public routes for properties Route::get('property/Property', 'PropertyPublicController@getProperty'); } ); }