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.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Models/User/User.php b/src/Models/User/User.php
index 058f9a8c..6db4de7e 100644
--- a/src/Models/User/User.php
+++ b/src/Models/User/User.php
@@ -5,6 +5,8 @@ namespace Engelsystem\Models\User;
use Carbon\Carbon;
use Engelsystem\Models\BaseModel;
use Engelsystem\Models\News;
+use Engelsystem\Models\NewsComment;
+use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Query\Builder as QueryBuilder;
@@ -23,6 +25,7 @@ use Illuminate\Database\Query\Builder as QueryBuilder;
* @property-read QueryBuilder|PersonalData $personalData
* @property-read QueryBuilder|Settings $settings
* @property-read QueryBuilder|State $state
+ * @property-read Collection|NewsComment[] $newsComments
*
* @method static QueryBuilder|User whereId($value)
* @method static QueryBuilder|User[] whereName($value)
@@ -105,4 +108,12 @@ class User extends BaseModel
{
return $this->hasMany(News::class);
}
+
+ /**
+ * @return HasMany
+ */
+ public function newsComments(): HasMany
+ {
+ return $this->hasMany(NewsComment::class);
+ }
}