. * * @package LibreNMS * @link http://librenms.org * @copyright 2018 Tony Murray * @author Tony Murray */ namespace App\Models; class OspfPort extends BaseModel { public $timestamps = false; protected $fillable = [ 'device_id', 'port_id', 'ospf_port_id', 'context_name', 'ospfIfIpAddress', 'ospfAddressLessIf', 'ospfIfAreaId', 'ospfIfType', 'ospfIfAdminStat', 'ospfIfRtrPriority', 'ospfIfTransitDelay', 'ospfIfRetransInterval', 'ospfIfHelloInterval', 'ospfIfRtrDeadInterval', 'ospfIfPollInterval', 'ospfIfState', 'ospfIfDesignatedRouter', 'ospfIfBackupDesignatedRouter', 'ospfIfEvents', 'ospfIfAuthKey', 'ospfIfStatus', 'ospfIfMulticastForwarding', 'ospfIfDemand', 'ospfIfAuthType', ]; // ---- Query Scopes ---- public function scopeHasAccess($query, User $user) { return $this->hasDeviceAccess($query, $user); } // ---- Define Relationships ---- public function device() { return $this->belongsTo('App\Models\Device', 'device_id'); } }