SetStartStatus(); //Get the characters for each non-invoiced ledger entry $charIds = Ledger::where([ 'invoiced' => 'No', ])->distinct('character_id') ->pluck('character_id'); //If character ids are null, then there are no ledgers to process. if($charIds->count() == 0) { //Set the task status as done and Log the issue $task->SetStopStatus(); Log::warning("No characters found to send invoices to in MiningTaxesInvoices Command."); return 0; } /** * From the list of character ids, create an array of mains and alts to group together. */ foreach($charIds as $charId) { } //Set the task as stopped $task->SetStopStatus(); return 0; } }