<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Account extends Model
{
    //

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 
    ];

    protected $fillable = ['username','domain','quota', 'enabled', 'sendonly','password'];


    public function domain()
    {
        // Model, foreign_key (this table), other_key (other table)
        return $this->belongsTo('App\Domain','domain','domain');
    }  

}
