19 lines
456 B
PHP
19 lines
456 B
PHP
<?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');
|
|
}
|
|
}
|