Files
monica/app/ContactField.php
T
Régis Freyd 8e575735d5 Add support for multiple contact fields and addresses (#657)
This requires to run the migrations `php artisan migrate` which might take some time.
2017-11-26 09:36:20 -05:00

47 lines
886 B
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);
}
}