Type hint all device model relations (#12686)

This commit is contained in:
Jellyfrog
2021-03-31 17:28:47 +02:00
committed by GitHub
parent dc160c6813
commit 4b6efba040
28 changed files with 90 additions and 64 deletions

View File

@@ -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');
}