James Cole
2023-01-01 13:55:14 +01:00
parent 8bbe519350
commit c60120ac20
2 changed files with 13 additions and 4 deletions

View File

@@ -40,10 +40,8 @@ use Illuminate\View\View;
*/ */
class EditController extends Controller class EditController extends Controller
{ {
/** @var AttachmentHelperInterface Helper for attachments. */ private AttachmentHelperInterface $attachments;
private $attachments; private BudgetRepositoryInterface $repository;
/** @var BudgetRepositoryInterface The budget repository */
private $repository;
/** /**
* EditController constructor. * EditController constructor.

View File

@@ -25,6 +25,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\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
@@ -88,4 +89,14 @@ class AutoBudget extends Model
{ {
return $this->belongsTo(TransactionCurrency::class); return $this->belongsTo(TransactionCurrency::class);
} }
/**
* @return Attribute
*/
protected function amount(): Attribute
{
return Attribute::make(
get: fn($value) => (string) $value,
);
}
} }