company = $company; } /** * Execute the job. * * * @return void */ public function handle() { MultiDB::setDb($this->company->db); $this->company ->invoices() ->where('is_deleted', 0) ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) ->cursor() ->each(function ($invoice){ $invoice->service()->setReminder()->save(); }); } }