mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Type hint all device model relations (#12686)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
use LibreNMS\Enum\Alert;
|
||||
|
||||
class Eventlog extends DeviceRelatedModel
|
||||
@@ -65,7 +66,7 @@ class Eventlog extends DeviceRelatedModel
|
||||
|
||||
// ---- Define Relationships ----
|
||||
|
||||
public function related()
|
||||
public function related(): MorphTo
|
||||
{
|
||||
return $this->morphTo('related', 'type', 'reference');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user