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