mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
d64f3acb15
* extract PortRelatedModel and DeviceRelatedModel * add scope for inDeviceGroup * handle null device group
23 lines
461 B
PHP
23 lines
461 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class PortsFdb extends PortRelatedModel
|
|
{
|
|
protected $table = 'ports_fdb';
|
|
protected $primaryKey = 'ports_fdb_id';
|
|
public $timestamps = false;
|
|
|
|
// ---- Define Relationships ----
|
|
|
|
public function device()
|
|
{
|
|
return $this->belongsTo('App\Models\Device', 'device_id', 'device_id');
|
|
}
|
|
|
|
public function vlan()
|
|
{
|
|
return $this->belongsTo('App\Models\Vlan', 'vlan_id', 'vlan_id');
|
|
}
|
|
}
|