. * * @package LibreNMS * @link http://librenms.org * @copyright 2018 Tony Murray * @author Tony Murray */ namespace App\Models; class PortsNac extends BaseModel { protected $table = 'ports_nac'; protected $primaryKey = 'ports_nac_id'; public $timestamps = false; protected $fillable = [ 'auth_id', 'device_id', 'port_id', 'domain', 'username', 'mac_address', 'ip_address', 'host_mode', 'authz_status', 'authz_by', 'authc_status', 'method', 'timeout', 'time_left', ]; public function scopeHasAccess($query, User $user) { return $this->hasPortAccess($query, $user); } // ---- Define Relationships ---- public function device() { return $this->belongsTo('App\Models\Device', 'device_id', 'device_id'); } public function port() { return $this->belongsTo('App\Models\Port', 'port_id', 'port_id'); } }