group(function () { Route::resource('campaign_task', 'CampaignTaskResourceController'); }); // Public routes for campaign_task Route::get('campaigns/', 'CampaignTaskPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignTaskPublicController@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', 'CampaignTaskResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampaignTaskPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignTaskPublicController@show'); } ); } // web routes for campaign Route::prefix('{guard}/campaign')->group(function () { Route::resource('campaign', 'CampaignResourceController'); }); // Public routes for campaign Route::get('campaigns/', 'CampaignPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignPublicController@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', 'CampaignResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampaignPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignPublicController@show'); } ); } // web routes for campaign_variant Route::prefix('{guard}/campaign')->group(function () { Route::resource('campaign_variant', 'CampaignVariantResourceController'); }); // Public routes for campaign_variant Route::get('campaigns/', 'CampaignVariantPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignVariantPublicController@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', 'CampaignVariantResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampaignVariantPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignVariantPublicController@show'); } ); } // web routes for campign_cooperation Route::prefix('{guard}/campaign')->group(function () { Route::resource('campign_cooperation', 'CampignCooperationResourceController'); }); // Public routes for campign_cooperation Route::get('campaigns/', 'CampignCooperationPublicController@index'); Route::get('campaigns/{slug?}', 'CampignCooperationPublicController@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', 'CampignCooperationResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampignCooperationPublicController@index'); Route::get('campaigns/{slug?}', 'CampignCooperationPublicController@show'); } ); }