group(function () { Route::get('onboarding/form/{element}', 'OnboardingAPIController@form'); Route::resource('onboarding', 'OnboardingAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for onboardings Route::prefix('{guard}/onboarding')->group(function () { Route::get('onboarding/form/{element}', 'OnboardingAPIController@form'); Route::apiResource('onboarding', 'OnboardingAPIController'); }); // Public routes for onboardings Route::get('onboarding/Onboarding', 'OnboardingPublicController@getOnboarding'); } ); }