mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-17 11:59:05 +00:00
Refactor models.
This commit is contained in:
@@ -66,13 +66,6 @@ class Location extends Model
|
||||
return $this->morphMany(TransactionJournal::class, 'locatable');
|
||||
}
|
||||
|
||||
protected function locatableId(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn ($value) => (int) $value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
@@ -84,4 +77,11 @@ class Location extends Model
|
||||
'longitude' => 'float',
|
||||
];
|
||||
}
|
||||
|
||||
protected function locatableId(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: static fn($value) => (int)$value,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user