mailer = $mailer; $this->accountRepo = $repo; $this->paymentService = $paymentService; } public function fire() { $this->info(date('Y-m-d').' ChargeRenewalInvoices...'); $account = $this->accountRepo->getNinjaAccount(); $invoices = Invoice::whereAccountId($account->id) ->whereDueDate(date('Y-m-d')) ->with('client') ->orderBy('id') ->get(); $this->info(count($invoices).' invoices found'); foreach ($invoices as $invoice) { $this->info("Charging invoice {$invoice->invoice_number}"); $this->paymentService->autoBillInvoice($invoice); } $this->info('Done'); } protected function getArguments() { return array( //array('example', InputArgument::REQUIRED, 'An example argument.'), ); } protected function getOptions() { return array( //array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null), ); } }