Solving the Hoover Tractor INVOICE issue
Using an Accessor in order to pad the INVOICE when calling it from a relationship. But this breaks other relationships where the INVOICE is standard without padding Currently looking into something like so
public function order(): BelongsTo
{
$this->INVOICE = Str::padLeft($this->INVOICE, 15);
return $this->belongsTo(Order::class, 'INVOICE', 'INVOICE');
}
Did not like this at the end of the day