mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Return amount as string
This commit is contained in:
parent
b39e16c51c
commit
75ea1c4f4b
@ -24,6 +24,7 @@ namespace FireflyIII\Models;
|
||||
|
||||
use Eloquent;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Support\Carbon;
|
||||
@ -97,4 +98,16 @@ class PiggyBankEvent extends Model
|
||||
{
|
||||
return $this->belongsTo(TransactionJournal::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the amount
|
||||
*
|
||||
* @return Attribute
|
||||
*/
|
||||
protected function amount(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => (string) $value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user