group(function () { Route::resource('plan', 'PlanResourceController'); }); // Guard routes for plan_feature Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_feature', 'PlanFeatureResourceController'); }); // Guard routes for plan_subscription_usage Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_subscription_usage', 'PlanSubscriptionUsageResourceController'); }); // Guard routes for plan_subscription Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_subscription', 'PlanSubscriptionResourceController'); }); // Public routes for plan Route::get('plans/', 'PlanPublicController@index'); Route::get('plan/{slug?}', 'PlanPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for plan Route::prefix('{guard}/plan')->group(function () { Route::resource('plan', 'PlanResourceController'); }); // Guard routes for plan_feature Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_feature', 'PlanFeatureResourceController'); }); // Guard routes for plan_subscription_usage Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_subscription_usage', 'PlanSubscriptionUsageResourceController'); }); // Guard routes for plan_subscription Route::prefix('{guard}/plan')->group(function () { Route::resource('plan_subscription', 'PlanSubscriptionResourceController'); }); // Public routes for plan Route::get('plans/', 'PlanPublicController@index'); Route::get('plan/{slug?}', 'PlanPublicController@show'); } ); }