Add User avatarUrl helper and harden dashboard billing lookup.
Deploy Ladill QR Plus / deploy (push) Successful in 23s
Deploy Ladill QR Plus / deploy (push) Successful in 23s
Fixes dashboard 500 after SSO when layout renders profile avatar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -44,4 +44,11 @@ class User extends Authenticatable
|
||||
['credit_balance' => 0, 'qr_codes_total' => 0, 'scans_total' => 0, 'status' => QrWallet::STATUS_ACTIVE],
|
||||
);
|
||||
}
|
||||
|
||||
public function avatarUrl(): ?string
|
||||
{
|
||||
$url = trim((string) $this->avatar_url);
|
||||
|
||||
return $url !== '' ? $url : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user