mailer = $mailer; $this->accountRepo = $repo; } public function fire() { $this->info(date('Y-m-d').' Running SendRenewalInvoices...'); $today = new DateTime(); $accounts = Account::whereRaw('datediff(curdate(), pro_plan_paid) = 355')->get(); $this->info(count($accounts).' accounts found'); dd(0); foreach ($accounts as $account) { $client = $this->accountRepo->getNinjaClient($account); $invitation = $this->accountRepo->createNinjaInvoice($client); $this->mailer->sendInvoice($invitation->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), ); } }