mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -129,7 +129,9 @@ class DeviceGroup extends BaseModel
|
||||
|
||||
public function services(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(\App\Models\Service::class, 'device_group_device', 'device_group_id', 'device_id');
|
||||
// $parentKey='id', $relatedKey='device_id' is required to generate the right SQL query.
|
||||
// Otherwise the primaryKey in Service.php will be used
|
||||
return $this->belongsToMany(\App\Models\Service::class, 'device_group_device', 'device_group_id', 'device_id', 'id', 'device_id');
|
||||
}
|
||||
|
||||
public function users(): BelongsToMany
|
||||
|
Reference in New Issue
Block a user