summaryrefslogtreecommitdiff
path: root/src/Models/User/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Models/User/User.php')
-rw-r--r--src/Models/User/User.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Models/User/User.php b/src/Models/User/User.php
index af213c4e..cca96dbe 100644
--- a/src/Models/User/User.php
+++ b/src/Models/User/User.php
@@ -4,6 +4,8 @@ namespace Engelsystem\Models\User;
use Carbon\Carbon;
use Engelsystem\Models\BaseModel;
+use Engelsystem\Models\News\News;
+use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Query\Builder as QueryBuilder;
@@ -95,4 +97,12 @@ class User extends BaseModel
->hasOne(State::class)
->withDefault();
}
+
+ /**
+ * @return HasMany
+ */
+ public function news(): HasMany
+ {
+ return $this->hasMany(News::class);
+ }
}