spotonlive / laravel-google-ads

Google Ads API for Laravel
MIT License
64 stars 58 forks source link

A quesiton about class dependencies #5

Closed Shuyinsama closed 8 years ago

Shuyinsama commented 8 years ago

Hi there,

I have integrated your service and I can see it works (I can get the return array of the user and all that) But when I use your sample code for getting the Campaign I get the following error.

Class 'App\Events\Frontend\Api\BiddingStrategyConfiguration'

Basically it can run the new Campaign() but it falls on the class dependencies. This probably has to do with how my project is set up, but I am running it circles at the moment. Eventually I want to make use of the TargetingIdeasService

Hope to hear from you. Thanks

nikolajlovenhardt commented 8 years ago

Hi Shuyinsama,

It's because you are using this namespace App\Events\Frontend\Api, you'll have to use the BiddingStrategyConfiguration.

<?php

namespace App\Events\Frontend\Api;

use BiddingStrategyConfiguration;

(...)
Shuyinsama commented 8 years ago

It must be something with this setup I guess. I am using the Laravel Boilerplate project as a base.

I guess I have to take some time and figure out how to exactly integrate this now :)

Thanks for the response.

nikolajlovenhardt commented 8 years ago

No - it's because you need to use the BiddingStrategyConfiguration. Otherwise it will look for the class in your App\Events\Frontend\Api namespace.

Just add use BiddingStrategyConfinguration at the top of your file.