group(function () { Route::resource('campaign_call', 'CampaignCallResourceController'); }); 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', 'CampaignCallResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampaignCallPublicController@index'); Route::get('campaigns/{slug?}', 'CampaignCallPublicController@show'); } ); } // web routes for campaign_database Route::prefix('{guard}/campaign')->group(function () { Route::resource('campaign_database', 'CampaignDatabaseResourceController'); }); 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', 'CampaignDatabaseResourceController'); }); // Public routes for pages Route::get('campaigns/', 'CampaignDatabasePublicController@index'); Route::get('campaigns/{slug?}', 'CampaignDatabasePublicController@show'); } ); }