Files
monica/app/ContactField.php
T

57 lines
1.0 KiB
PHP

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ContactField extends Model
{
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = ['id'];
/**
* Get the account record associated with the gift.
*
* @return BelongsTo
*/
public function account()
{
return $this->belongsTo(Account::class);
}
/**
* Get the contact record associated with the gift.
*
* @return BelongsTo
*/
public function contact()
{
return $this->belongsTo(Contact::class);
}
/**
* Get the contact record associated with the gift.
*
* @return BelongsTo
*/
public function contactFieldType()
{
return $this->belongsTo(ContactFieldType::class);
}
/**
* Get the data field of the contact field.
*
* @return string
*/
public function getDataAttribute($value)
{
return $value;
}
}