lots of improvements

This commit is contained in:
Doar Mihai
2026-02-22 20:02:34 +02:00
parent 83fc389755
commit 29b5eca900
69 changed files with 3460 additions and 434 deletions
+27 -2
View File
@@ -9,11 +9,12 @@ use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Support\Str;
use Multicaret\Acquaintances\Traits\Friendable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
use HasFactory, Notifiable, Friendable;
/**
* The attributes that are mass assignable.
@@ -47,7 +48,7 @@ class User extends Authenticatable
'password' => 'hashed',
];
protected static function boot()
protected static function boot(): void
{
parent::boot();
@@ -93,4 +94,28 @@ class User extends Authenticatable
{
return $this->hasMany(GameList::class);
}
/**
* Get the forum threads created by the user.
*/
public function forumThreads()
{
return $this->hasMany(ForumThread::class);
}
/**
* Get the forum topics created by the user.
*/
public function forumTopics()
{
return $this->hasMany(ForumTopic::class);
}
/**
* Get the forum posts created by the user.
*/
public function forumPosts()
{
return $this->hasMany(ForumPost::class);
}
}