group(function () { Route::resource('accessory', 'AccessoryResourceController'); }); // Guard routes for category Route::prefix('{guard}/accessory')->group(function () { Route::resource('category', 'CategoryResourceController'); }); // Public routes for accessory Route::get('accessories/', 'AccessoryPublicController@index'); Route::get('accessory/{slug?}', 'AccessoryPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for accessory Route::prefix('{guard}/accessory')->group(function () { Route::resource('accessory', 'AccessoryResourceController'); }); // Guard routes for category Route::prefix('{guard}/accessory')->group(function () { Route::resource('category', 'CategoryResourceController'); }); // Public routes for accessory Route::get('accessories/', 'AccessoryPublicController@index'); Route::get('accessory/{slug?}', 'AccessoryPublicController@show'); } ); }