group(function () { Route::get('campaign_call/form/{element}', 'CampaignCallAPIController@form'); Route::resource('campaign_call', 'CampaignCallAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for campaigns Route::prefix('{guard}/campaign')->group(function () { Route::get('campaign_call/form/{element}', 'CampaignCallAPIController@form'); Route::apiResource('campaign_call', 'CampaignCallAPIController'); }); // Public routes for campaigns Route::get('campaign/CampaignCall', 'CampaignCallPublicController@getCampaignCall'); } ); } // API routes for campaign_database Route::prefix('{guard}/campaign')->group(function () { Route::get('campaign_database/form/{element}', 'CampaignDatabaseAPIController@form'); Route::resource('campaign_database', 'CampaignDatabaseAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for campaigns Route::prefix('{guard}/campaign')->group(function () { Route::get('campaign_database/form/{element}', 'CampaignDatabaseAPIController@form'); Route::apiResource('campaign_database', 'CampaignDatabaseAPIController'); }); // Public routes for campaigns Route::get('campaign/CampaignDatabase', 'CampaignDatabasePublicController@getCampaignDatabase'); } ); }