Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The service 'CampaignService' is not found #51

Open
amitklahiri opened this issue Apr 6, 2020 · 1 comment
Open

The service 'CampaignService' is not found #51

amitklahiri opened this issue Apr 6, 2020 · 1 comment

Comments

@amitklahiri
Copy link

Hi.

I am using this library with Laravel 6.

  1. I have configured google-ads.php with the correct configuration. Also, update the 'refreshToken' with the new token received in the console panel.

  2. use Edujugon\GoogleAds\GoogleAds;

  3. Trying to list all the available campaign id and name.
    Getting this code snippets here and try it like this,

$response = $ads->service(CampaignService::class)
->select(['Id', 'Name', 'Status', 'ServingStatus', 'StartDate', 'EndDate'])
->get();

  1. Receive the below error.
    Edujugon\GoogleAds\Exceptions\Service
    The service 'App\Http\Controllers\CampaignService' is not available. Please pass a valid service

Please help me to resolve the issues. Let me know if you need further information. I am waiting for your reply.

Thanks.

@amitklahiri amitklahiri changed the title The service 'CamPaignService' is not found The service 'CampaignService' is not found Apr 6, 2020
@nlrchudamani
Copy link

use Google\AdsApi\AdWords\v201809\cm\CampaignService; add this to your controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants