mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Refactor eloquent base (#9716)
* extract PortRelatedModel and DeviceRelatedModel * add scope for inDeviceGroup * handle null device group
This commit is contained in:
@@ -2,10 +2,15 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Ipv4Mac extends Model
|
||||
class Ipv4Mac extends PortRelatedModel
|
||||
{
|
||||
protected $table = 'ipv4_mac';
|
||||
public $timestamps = false;
|
||||
|
||||
// ---- Define Relationships ----
|
||||
|
||||
public function device()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Device', 'device_id');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user