d2d.emegrendeles.hu/app/Models/Address.php
E98Developer 68b7c35bef git init
2026-02-28 06:53:05 +01:00

23 lines
453 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Address extends BaseAuditable
{
protected $appends = ['fullAddress'];
public function attachable(): MorphTo
{
return $this->morphTo();
}
public function getFullAddressAttribute(): string
{
return "{$this->postCode} {$this->city} {$this->street}";
return $this->postCode.' '.$this->city.' '.$this->street;
}
}