31 lines
526 B
PHP
31 lines
526 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class EmailAddress extends Model
|
|
{
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'account', 'password',
|
|
'domain_name_id'
|
|
];
|
|
|
|
// * METHODS
|
|
|
|
/**
|
|
* domain_name getter
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getDomainNameAttribute()
|
|
{
|
|
$dn = DomainName::findOrFail($this->domain_name_id);
|
|
return $dn->utf8_name;
|
|
}
|
|
}
|