mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
First code for #2723
This commit is contained in:
@@ -150,6 +150,21 @@ class Account extends Model
|
||||
return $this->belongsTo(AccountType::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the account number.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccountNumberAttribute(): ?string
|
||||
{
|
||||
/** @var AccountMeta $metaValue */
|
||||
$metaValue = $this->accountMeta()
|
||||
->where('name', 'account_number')
|
||||
->first();
|
||||
|
||||
return $metaValue ? $metaValue->data : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @codeCoverageIgnore
|
||||
|
Reference in New Issue
Block a user