mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This commit is contained in:
parent
0c6e00666b
commit
8f15bd716d
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
namespace FireflyIII\Models;
|
namespace FireflyIII\Models;
|
||||||
|
|
||||||
use Eloquent;
|
use Eloquent;
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
@ -154,7 +155,7 @@ class PiggyBank extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all of the tags for the post.
|
* Get all the tags for the post.
|
||||||
*/
|
*/
|
||||||
public function objectGroups()
|
public function objectGroups()
|
||||||
{
|
{
|
||||||
@ -188,4 +189,16 @@ class PiggyBank extends Model
|
|||||||
{
|
{
|
||||||
$this->attributes['targetamount'] = (string) $value;
|
$this->attributes['targetamount'] = (string) $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the max amount
|
||||||
|
*
|
||||||
|
* @return Attribute
|
||||||
|
*/
|
||||||
|
protected function targetamount(): Attribute
|
||||||
|
{
|
||||||
|
return Attribute::make(
|
||||||
|
get: fn($value) => (string) $value,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user