group(function () { Route::resource('profile', 'ProfileResourceController'); }); // Guard routes for request Route::prefix('{guard}/profile')->group(function () { Route::resource('request', 'RequestResourceController'); }); // Guard routes for shortlist Route::prefix('{guard}/profile')->group(function () { Route::resource('shortlist', 'ShortlistResourceController'); }); // Guard routes for visit Route::prefix('{guard}/profile')->group(function () { Route::resource('visit', 'VisitResourceController'); }); // Public routes for profile Route::get('profiles/', 'ProfilePublicController@index'); Route::get('profile/{slug?}', 'ProfilePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for profile Route::prefix('{guard}/profile')->group(function () { Route::resource('profile', 'ProfileResourceController'); }); // Guard routes for request Route::prefix('{guard}/profile')->group(function () { Route::resource('request', 'RequestResourceController'); }); // Guard routes for shortlist Route::prefix('{guard}/profile')->group(function () { Route::resource('shortlist', 'ShortlistResourceController'); }); // Guard routes for visit Route::prefix('{guard}/profile')->group(function () { Route::resource('visit', 'VisitResourceController'); }); // Public routes for profile Route::get('profiles/', 'ProfilePublicController@index'); Route::get('profile/{slug?}', 'ProfilePublicController@show'); } ); }