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