mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
36e54ab9f1
* Use model::class instead of string for binding Originally from laravel shift Shift bindings PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser. * Shift cleanup
23 lines
472 B
PHP
23 lines
472 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class PortsFdb extends PortRelatedModel
|
|
{
|
|
protected $table = 'ports_fdb';
|
|
protected $primaryKey = 'ports_fdb_id';
|
|
public $timestamps = true;
|
|
|
|
// ---- Define Relationships ----
|
|
|
|
public function device()
|
|
{
|
|
return $this->belongsTo(\App\Models\Device::class, 'device_id', 'device_id');
|
|
}
|
|
|
|
public function vlan()
|
|
{
|
|
return $this->belongsTo(\App\Models\Vlan::class, 'vlan_id', 'vlan_id');
|
|
}
|
|
}
|