group(function () { Route::resource('product', 'ProductResourceController'); }); // Guard routes for product Route::prefix('{guard}/product')->group(function () { Route::resource('product', 'ProductResourceController'); }); // Guard routes for carrier Route::prefix('{guard}/product')->group(function () { Route::resource('carrier', 'CarrierResourceController'); }); // Public routes for product Route::get('products/', 'ProductPublicController@index'); Route::get('product/{slug?}', 'ProductPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for product Route::prefix('{guard}/product')->group(function () { Route::resource('product', 'ProductResourceController'); }); // Guard routes for product Route::prefix('{guard}/product')->group(function () { Route::resource('product', 'ProductResourceController'); }); // Guard routes for carrier Route::prefix('{guard}/product')->group(function () { Route::resource('carrier', 'CarrierResourceController'); }); // Public routes for product Route::get('products/', 'ProductPublicController@index'); Route::get('product/{slug?}', 'ProductPublicController@show'); } ); }