group(function () { Route::resource('group', 'GroupResourceController'); }); 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', 'GroupResourceController'); }); // Public routes for pages Route::get('products/', 'GroupPublicController@index'); Route::get('products/{slug?}', 'GroupPublicController@show'); } ); } // web routes for attribute Route::prefix('{guard}/product')->group(function () { Route::resource('attribute', 'AttributeResourceController'); }); 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', 'AttributeResourceController'); }); // Public routes for pages Route::get('products/', 'AttributePublicController@index'); Route::get('products/{slug?}', 'AttributePublicController@show'); } ); } // web routes for product_attribute Route::prefix('{guard}/product')->group(function () { Route::resource('product_attribute', 'ProductAttributeResourceController'); }); 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', 'ProductAttributeResourceController'); }); // Public routes for pages Route::get('products/', 'ProductAttributePublicController@index'); Route::get('products/{slug?}', 'ProductAttributePublicController@show'); } ); } // web routes for product_group Route::prefix('{guard}/product')->group(function () { Route::resource('product_group', 'ProductGroupResourceController'); }); 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', 'ProductGroupResourceController'); }); // Public routes for pages Route::get('products/', 'ProductGroupPublicController@index'); Route::get('products/{slug?}', 'ProductGroupPublicController@show'); } ); }