API allows update/set of budget limit notes. https://github.com/firefly-iii/firefly-iii/issues/5523

This commit is contained in:
James Cole
2024-11-30 05:42:59 +01:00
parent c25c0d37c5
commit f5c56e02da
8 changed files with 187 additions and 144 deletions

View File

@@ -31,6 +31,7 @@ use FireflyIII\Support\Models\ReturnsIntegerIdTrait;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
@@ -90,6 +91,14 @@ class BudgetLimit extends Model
return $this->belongsTo(TransactionCurrency::class);
}
/**
* Get all the notes.
*/
public function notes(): MorphMany
{
return $this->morphMany(Note::class, 'noteable');
}
/**
* Get the amount
*/