From 6f700ccc95792d97e329a1d0173a2ff03f180247 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 13 Nov 2024 18:42:44 +0000 Subject: [PATCH] Added relationship for adminuser Signed-off-by: snipe --- app/Models/Import.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/Models/Import.php b/app/Models/Import.php index 052612a197..d824a3840c 100644 --- a/app/Models/Import.php +++ b/app/Models/Import.php @@ -14,4 +14,16 @@ class Import extends Model 'first_row' => 'array', 'field_map' => 'json', ]; + + /** + * Establishes the license -> admin user relationship + * + * @author A. Gianotto + * @since [v2.0] + * @return \Illuminate\Database\Eloquent\Relations\Relation + */ + public function adminuser() + { + return $this->belongsTo(\App\Models\User::class, 'created_by'); + } }