group(function () { Route::resource('car', 'CarResourceController'); }); // Guard routes for carmodel Route::prefix('{guard}/car')->group(function () { Route::resource('carmodel', 'CarmodelResourceController'); }); // Guard routes for brand Route::prefix('{guard}/car')->group(function () { Route::resource('brand', 'BrandResourceController'); }); // Public routes for car Route::get('cars/', 'CarPublicController@index'); Route::get('car/{slug?}', 'CarPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for car Route::prefix('{guard}/car')->group(function () { Route::resource('car', 'CarResourceController'); }); // Guard routes for carmodel Route::prefix('{guard}/car')->group(function () { Route::resource('carmodel', 'CarmodelResourceController'); }); // Guard routes for brand Route::prefix('{guard}/car')->group(function () { Route::resource('brand', 'BrandResourceController'); }); // Public routes for car Route::get('cars/', 'CarPublicController@index'); Route::get('car/{slug?}', 'CarPublicController@show'); } ); }