vmailadmin/app/Alias.php

19 lines
456 B
PHP
Raw Permalink Normal View History

2020-05-23 15:20:01 +02:00
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Alias extends Model
{
//
protected $table = 'aliases';
protected $fillable = ['source_username','source_domain', 'destination_username', 'destination_domain','comment', 'enabled'];
public function source_domain()
{
// Model, foreign_key (this table), other_key (other table)
return $this->belongsTo('App\Domain','source_domain','domain');
}
}