title: Unable to resolve dependency - Laravel
body: <p>Illuminate\Contracts\Container\BindingResolutionException
  Unable to resolve dependency [Parameter #0 [  $customerId ]] in class App\Jobs\BudgetFetch</p>
  <pre><code>namespace App\Http\Controllers;
  use App\Jobs\BudgetFetch;
  use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
  use Google\Ads\GoogleAds\Lib\V3\GoogleAdsClientBuilder;
  use Illuminate\Support\Facades\DB;
  
  class APIController extends Controller
  {
      public function index() {
          $clients = DB::table('account_names')-&gt;pluck('code');
  
          foreach($clients as $customerId) {
              budgetFetch::dispatch($customerId);
          }
      }
  }
  </code></pre>
  <p>The above is a simple controller I've put together to trigger another job which is;</p>
  <pre><code>namespace App\Jobs;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Foundation\Bus\Dispatchable;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Queue\SerializesModels;
  use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;
  use Google\Ads\GoogleAds\Lib\V3\GoogleAdsClientBuilder;
  
  class BudgetFetch implements ShouldQueue
  {
      use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  
      /**
       * Create a new job instance.
       *
       * @return void
       */
      public function __construct()
      {
  
      }
  
      /**
       * Execute the job.
       *
       * @return void
       */
      public function handle($customerId)
      {
          $clientId = &quot;xxxxxxxxxxxx&quot;;
          $clientSecret = &quot;xxxxxxxxxxx&quot;;
          $refreshToken = &quot;xxxxxxxxxxxxxxxxxx&quot;;
          $developerToken = &quot;xxxxxxxxxxxxxxxxxx&quot;;
          $loginCustomerId = &quot;xxxxxxxxxxx&quot;;
  
          $oAuth2Credential = (new OAuth2TokenBuilder())
              -&gt;withClientId($clientId)
              -&gt;withClientSecret($clientSecret)
              -&gt;withRefreshToken($refreshToken)
              -&gt;build()
          ;
  
          $googleAdsClient = (new GoogleAdsClientBuilder())
              -&gt;withDeveloperToken($developerToken)
              -&gt;withLoginCustomerId($loginCustomerId)
              -&gt;withOAuth2Credential($oAuth2Credential)
              -&gt;build()
          ;
  
          $googleAdsServiceClient = $googleAdsClient-&gt;getGoogleAdsServiceClient();
          $query = 'SELECT campaign.id, campaign.name, metrics.cost_micros, campaign_budget.amount_micros FROM campaign ORDER BY campaign.id';
          /** @var GoogleAdsServerStreamDecorator $stream */
          $stream =
              $googleAdsServiceClient-&gt;searchStream($customerId, $query);
  
          foreach ($stream-&gt;iterateAllElements() as $googleAdsRow) {
              /** @var GoogleAdsRow $googleAdsRow */
              $metrics = $googleAdsRow-&gt;getMetrics();
              $id = $googleAdsRow-&gt;getCampaign()-&gt;getId()-&gt;getValue();
              $name = $googleAdsRow-&gt;getCampaign()-&gt;getName()-&gt;getValue();
              $spend = $googleAdsRow-&gt;getCampaignBudget()-&gt;getAmountMicros()-&gt;getValue();
              $budget = $metrics-&gt;getCostMicrosUnwrapped();
  
              if($spend &gt;= $budget){
                  DB::table('budget_alerts')-&gt;insert(
                      ['campaign' =&gt; $id, 'hitBudget' =&gt; 1]
                  );
              };
          }
      }
  }
  </code></pre>
  <p>The error at the top of the question is what I get from this, If I put the variable in  __construct the same thing happens. I've run a php artisan clear-compiled which I found in another question similar and it didn't seem to fix anything.</p>