lots of improvements
This commit is contained in:
+27
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user