Files
wticreatorstudio/Modules/WTIJobBoard/Entities/JobRequestApplicationAddress.php
T
2024-02-12 22:54:20 -05:00

29 lines
763 B
PHP

<?php
namespace Modules\WTIJobBoard\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class JobRequestApplicationAddress extends Model
{
use SoftDeletes;
protected $table = "job_request_application_addresses";
protected $guarded = ["id"];
protected $appends = [
'shipping_address'
];
protected $dates = ['deleted_at'];
public function application()
{
return $this->belongsTo(JobRequestApplication::class, 'job_request_application_id', 'id');
}
public function getShippingAddressAttribute()
{
return "{$this->address} {$this->state} {$this->city} {$this->zipcode}, {$this->country} - {$this->phone}";
}
}