group(function () { Route::resource('subscription_usage', 'SubscriptionUsageResourceController'); }); // Public routes for subscription_usage Route::get('plans/', 'SubscriptionUsagePublicController@index'); Route::get('plans/{slug?}', 'SubscriptionUsagePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'SubscriptionUsageResourceController'); }); // Public routes for pages Route::get('plans/', 'SubscriptionUsagePublicController@index'); Route::get('plans/{slug?}', 'SubscriptionUsagePublicController@show'); } ); } // web routes for subscription Route::prefix('{guard}/plan')->group(function () { Route::resource('subscription', 'SubscriptionResourceController'); }); // Public routes for subscription Route::get('plans/', 'SubscriptionPublicController@index'); Route::get('plans/{slug?}', 'SubscriptionPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'SubscriptionResourceController'); }); // Public routes for pages Route::get('plans/', 'SubscriptionPublicController@index'); Route::get('plans/{slug?}', 'SubscriptionPublicController@show'); } ); } // web routes for feature Route::prefix('{guard}/plan')->group(function () { Route::resource('feature', 'FeatureResourceController'); }); // Public routes for feature Route::get('plans/', 'FeaturePublicController@index'); Route::get('plans/{slug?}', 'FeaturePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'FeatureResourceController'); }); // Public routes for pages Route::get('plans/', 'FeaturePublicController@index'); Route::get('plans/{slug?}', 'FeaturePublicController@show'); } ); } // web routes for plan Route::prefix('{guard}/plan')->group(function () { Route::resource('plan', 'PlanResourceController'); }); // Public routes for plan Route::get('plans/', 'PlanPublicController@index'); Route::get('plans/{slug?}', 'PlanPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'PlanResourceController'); }); // Public routes for pages Route::get('plans/', 'PlanPublicController@index'); Route::get('plans/{slug?}', 'PlanPublicController@show'); } ); }