fix smc profile can't load bug

This commit is contained in:
Omair Saleh
2022-09-30 16:27:34 +08:00
parent aa8c99eb63
commit 03368ff1d9
@@ -27,7 +27,8 @@ class WalletTransactionResource extends JsonResource
$description = 'Credit Voucher for '.$this->payment_reference;
break;
case 1:
$marking = Transaction::where('payment_reference', $this->bill_no)->first()->owner->marking;
$bill = Transaction::where('payment_reference', $this->bill_no)->first();
$marking = $bill ? $bill->owner->marking : 'Unknown';
$description = 'Payment For booking refs.'.'<a href="'.route('booking.details', $marking).'">'.$marking.'</a>';
break;
case 11: