mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-21 21:20:04 +00:00
PHPStorm can order methods by alphabet, who knew.
This commit is contained in:
@@ -63,8 +63,8 @@ use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
* @method static Builder|Location whereUpdatedAt($value)
|
||||
* @method static Builder|Location whereZoomLevel($value)
|
||||
*
|
||||
* @property Collection<int, \FireflyIII\Models\TransactionJournal> $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
* @property Collection<int, TransactionJournal> $transactionJournals
|
||||
* @property null|int $transaction_journals_count
|
||||
*
|
||||
* @mixin Eloquent
|
||||
*/
|
||||
@@ -74,13 +74,13 @@ class Location extends Model
|
||||
|
||||
protected $casts
|
||||
= [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
'zoomLevel' => 'int',
|
||||
'latitude' => 'float',
|
||||
'longitude' => 'float',
|
||||
];
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
'zoomLevel' => 'int',
|
||||
'latitude' => 'float',
|
||||
'longitude' => 'float',
|
||||
];
|
||||
|
||||
protected $fillable = ['locatable_id', 'locatable_type', 'latitude', 'longitude', 'zoom_level'];
|
||||
|
||||
@@ -101,11 +101,6 @@ class Location extends Model
|
||||
return $this->morphMany(Account::class, 'locatable');
|
||||
}
|
||||
|
||||
public function transactionJournals(): MorphMany
|
||||
{
|
||||
return $this->morphMany(TransactionJournal::class, 'locatable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the owning attachable models.
|
||||
*/
|
||||
@@ -114,6 +109,11 @@ class Location extends Model
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function transactionJournals(): MorphMany
|
||||
{
|
||||
return $this->morphMany(TransactionJournal::class, 'locatable');
|
||||
}
|
||||
|
||||
protected function locatableId(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
|
||||
Reference in New Issue
Block a user