Changeset View
Changeset View
Standalone View
Standalone View
src/app/PowerDNS/Record.php
- This file was added.
<?php | |||||
namespace App\PowerDNS; | |||||
use Illuminate\Database\Eloquent\Model; | |||||
class Record extends Model | |||||
{ | |||||
protected $fillable = [ | |||||
'domain_id', | |||||
'name', | |||||
'type', | |||||
'content' | |||||
]; | |||||
protected $table = 'powerdns_records'; | |||||
public function domain() | |||||
{ | |||||
return $this->belongsTo('App\PowerDNS\Domain', 'domain_id', 'id'); | |||||
} | |||||
public function toString() | |||||
{ | |||||
return "{$this->name}. {$this->type} {$this->content}"; | |||||
} | |||||
} |