group(function () { Route::get('member/form/{element}', 'MemberAPIController@form'); Route::resource('member', 'MemberAPIController'); }); // Public routes for member Route::get('members/', 'MemberPublicController@index'); Route::get('members/{slug?}', 'MemberPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for members Route::prefix('{guard}/member')->group(function () { Route::get('member/form/{element}', 'MemberAPIController@form'); Route::apiResource('member', 'MemberAPIController'); }); // Public routes for members Route::get('member/Member', 'MemberPublicController@getMember'); } ); } // API routes for type Route::prefix('{guard}/member')->group(function () { Route::get('type/form/{element}', 'TypeAPIController@form'); Route::resource('type', 'TypeAPIController'); }); // Public routes for type Route::get('members/', 'TypePublicController@index'); Route::get('members/{slug?}', 'TypePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for members Route::prefix('{guard}/member')->group(function () { Route::get('type/form/{element}', 'TypeAPIController@form'); Route::apiResource('type', 'TypeAPIController'); }); // Public routes for members Route::get('member/Type', 'TypePublicController@getType'); } ); } // API routes for membership Route::prefix('{guard}/member')->group(function () { Route::get('membership/form/{element}', 'MembershipAPIController@form'); Route::resource('membership', 'MembershipAPIController'); }); // Public routes for membership Route::get('members/', 'MembershipPublicController@index'); Route::get('members/{slug?}', 'MembershipPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for members Route::prefix('{guard}/member')->group(function () { Route::get('membership/form/{element}', 'MembershipAPIController@form'); Route::apiResource('membership', 'MembershipAPIController'); }); // Public routes for members Route::get('member/Membership', 'MembershipPublicController@getMembership'); } ); }