group(function () { Route::resource('dealer', 'DealerResourceController'); }); // Public routes for dealer Route::get('dealers/', 'DealerPublicController@index'); Route::get('dealer/{slug?}', 'DealerPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for dealer Route::prefix('{guard}/dealer')->group(function () { Route::resource('dealer', 'DealerResourceController'); }); // Public routes for dealer Route::get('dealers/', 'DealerPublicController@index'); Route::get('dealer/{slug?}', 'DealerPublicController@show'); } ); }